GObject Introspection, how to suppress GTK4

2018-08-19 Thread Stefan Salewski
I have a Nim gintro user who has both GTK4 and GTK3 installed on his box, and seems to have some trouble: https://github.com/StefanSalewski/gintro/issues/30 I can not test that, because for my Gentoo Linux box only GTK3 is official available. My gintro package should generate latest GTK3 bindin

Re: How do we get GTYPE from gobject introspection language bindings

2017-09-30 Thread Stefan Salewski
On Fri, 2017-09-29 at 04:45 +, Gergely Polonkai wrote: > As a side note, STRING probably refers to https://developer.gnome.org > /glib/stable/glib-Strings.html which is a more OO string > implementation. G_TYPE_STRING being gchararray is of more close > relation with C strings (except it consis

Re: How do we get GTYPE from gobject introspection language bindings

2017-09-28 Thread Gergely Polonkai
macros like G_TYPE_STRING which > for my box gives currently value 64. These values seems to be not > directly supported by gobject-introspection. Seems to be no big > problem, we may query the values by g-type-from-name(). > > > https://developer.gnome.org/gobject/stable/gobject-Type-Inf

How do we get GTYPE from gobject introspection language bindings

2017-09-28 Thread Stefan Salewski
gives currently value 64. These values seems to be not directly supported by gobject-introspection. Seems to be no big problem, we may query the values by g-type-from-name(). https://developer.gnome.org/gobject/stable/gobject-Type-Information.html#g-type-from-name For G_TYPE_STRING I assumed that name

Re: One more Gobject Introspection issue

2017-09-23 Thread Phil Clayton
an icon name or %NULL a stock icon size (#GtkIconSize) So ctype is GtkIconSize, but due to name="gint" I get from gobject- introspection only plain gint=int32. Unfortunately there ex

Re: One more Gobject Introspection issue

2017-09-15 Thread Stefan Salewski
On Fri, 2017-09-15 at 10:28 +0100, Emmanuele Bassi wrote: > All API that takes a GtkIconSize should have a `type int` annotation. Thanks. I learned that already from the reply of Mr. Phil Clayton. Seems that some functions like gtk_toolbar_set_icon_size() do not yet have a `type int` annotation.

Re: One more Gobject Introspection issue

2017-09-15 Thread Emmanuele Bassi
On 14 September 2017 at 21:12, Stefan Salewski wrote: > GtkIconSize type is reported as plain gint, but it is an enum. It's an "extensible" enumeration, like GtkResponseType for GtkDialog: the API accepts an integer, because app and library developers can register their own icon sizes, but GTK+ p

Re: One more Gobject Introspection issue

2017-09-15 Thread Stefan Salewski
On Fri, 2017-09-15 at 09:57 +0100, Phil Clayton wrote: > Have a look at > https://bugzilla.gnome.org/show_bug.cgi?id=601425 Great, thanks. I had looked only into the list of gobject-introspection bugs mentioned at the bottom of this page: https://wiki.gnome.org/action/show/Pr

Gobject decorator -> How to deal with properties

2017-09-15 Thread Gonzalo Aguilar Delgado
Hello, I'm writting a decorator pattern for a protocol in Thrift that's based on c_glib. One of the cases I found is that you can have this: // From Thrift code: /*! * Thrift Protocol Decorator instance. */ struct _ThriftProtocolDecorator { ThriftProtocol parent; ThriftProtocol *concr

One more Gobject Introspection issue

2017-09-14 Thread Stefan Salewski
(#GtkIconSize) So ctype is GtkIconSize, but due to name="gint" I get from gobject- introspection only plain gint=int32. Unfortunately there exists a few functions with that bug, and it is some work fixing it manually. I will investigate if there is a way to get the ctype fr

Re: Pango library seems to be really hard for gobject-introspection?

2017-09-11 Thread Stefan Salewski
On Mon, 2017-09-11 at 07:25 +, Emmanuele Bassi wrote: > If you're writing a language binding, you should use the GBoxed API > for all boxed types, as that defers to the correct function without > having to make up an annotation for copy and free functions. That is interesting, thanks. I will r

Re: Pango library seems to be really hard for gobject-introspection?

2017-09-11 Thread Emmanuele Bassi
On Sun, 10 Sep 2017 at 00:29, Stefan Salewski wrote: > On Sat, 2017-09-09 at 21:46 +, Emmanuele Bassi wrote: > > Boxed types use g_boxed_free() to release resources, and > > g_boxed_copy() to copy them: > > https://developer.gnome.org/gobject/stable/gobject-Boxed-Ty

Re: Pango library seems to be really hard for gobject-introspection?

2017-09-09 Thread Stefan Salewski
On Sat, 2017-09-09 at 21:46 +, Emmanuele Bassi wrote: > Boxed types use g_boxed_free() to release resources, and > g_boxed_copy() to copy them: > https://developer.gnome.org/gobject/stable/gobject-Boxed-Types.html > > Ciao, >  Emmanuele. Yes I know :-) But from https://d

Re: Pango library seems to be really hard for gobject-introspection?

2017-09-09 Thread Emmanuele Bassi
Boxed types use g_boxed_free() to release resources, and g_boxed_copy() to copy them: https://developer.gnome.org/gobject/stable/gobject-Boxed-Types.html Ciao, Emmanuele. On Sat, 9 Sep 2017 at 21:29, Stefan Salewski wrote: > First I noticed that for pango_font_description_from_str

Pango library seems to be really hard for gobject-introspection?

2017-09-09 Thread Stefan Salewski
First I noticed that for pango_font_description_from_string() >From /usr/share/gir-1.0/Pango-1.0.gir we know that transfer- ownership="full" so we have to free it in our language bindings. But how to guess the function for freeing? For gobject there is generally a plain g

Re: How do you write common codes for GObject?

2017-09-05 Thread Kouhei Sutou
Hi, Thanks to all! In "Re: How do you write common codes for GObject?" on Mon, 4 Sep 2017 15:49:34 +0100, Emmanuele Bassi wrote: >> We need to write common codes for GObject like the >> followings: ... >> How do you write them? > >> d. Ot

Re: How do you write common codes for GObject?

2017-09-04 Thread Gergely Polonkai
If I ned to be backwards compatible, I go with GobGen (an Emacs package I wrote, available on MELPA). If not, see ebassi’s answer. On Mon, Sep 4, 2017, 16:46 Kouhei Sutou wrote: > Hi, > > We need to write common codes for GObject like the > followings: > > #defi

Re: How do you write common codes for GObject?

2017-09-04 Thread Andrea Zagli via gtk-list
use new macros if you don't need back compatibility Il giorno lun 04 set 2017 16:03:55 CEST, Kouhei Sutou ha scritto: Hi, We need to write common codes for GObject like the followings: #define GTK_TYPE_WIDGET (gtk_widget_get_type ()) #define GTK_WIDGET(w

Re: How do you write common codes for GObject?

2017-09-04 Thread Emmanuele Bassi
On 4 September 2017 at 15:03, Kouhei Sutou wrote: > Hi, > > We need to write common codes for GObject like the > followings: > > #define GTK_TYPE_WIDGET (gtk_widget_get_type ()) > #define GTK_WIDGET(widget)(G_TYPE_CHECK_INSTANCE_CAST > ((

How do you write common codes for GObject?

2017-09-04 Thread Kouhei Sutou
Hi, We need to write common codes for GObject like the followings: #define GTK_TYPE_WIDGET (gtk_widget_get_type ()) #define GTK_WIDGET(widget)(G_TYPE_CHECK_INSTANCE_CAST ((widget), GTK_TYPE_WIDGET, GtkWidget)) #define GTK_WIDGET_CLASS(klass

Re: GObject introspection and cairo?

2017-07-15 Thread Stefan Salewski
On Sat, 2017-07-15 at 18:21 +0200, Nicola Fontana wrote: > They have been included in gobject-introspection 1.53.2, released > on may: > > https://git.gnome.org/browse/gobject-introspection/log/ Fine. My Gentoo box has still dev-libs/glib-2.50.3-r1:2::gentoo I will try to grab the

Re: GObject introspection and cairo?

2017-07-15 Thread Nicola Fontana
t; > Ciao. > > Is it already known when these patches will be available for ordinary > users? > ... They have been included in gobject-introspection 1.53.2, released on may: https://git.gnome.org/browse/gobject-introspection/log/ Ciao. -- Nicola ___

Re: GObject introspection and cairo?

2017-07-15 Thread Stefan Salewski
On Tue, 2017-05-09 at 17:05 +0200, Nicola Fontana wrote: > Il Tue, 09 May 2017 16:39:10 +0200 Stefan Salewski > scrisse: > > > I am currently working again on the gobject introspection based > > bindings for Nim language (https://github.com/StefanSalewski/nim-gi > > )

gtk-doc and gobject-introspection without gobject?

2017-06-11 Thread Andrea Zagli via gtk-list
can gtk-doc and gobject-introspection be used for a library that don't have gobjects? i have a library that is only a set of utility functions (that use glib/gtk/etc): can i use gtk-doc and/or gobject-introspection? thanks in advance ___ gtk

Re: GObject property validation during object construction

2017-06-07 Thread Eric Cashon via gtk-list
Hi Link, My understanding is that the private string gets setup in my_object_class_init(). Then in my_object_init() you can initialize it to a default value. After that, you can set a new string value using a property set accessor function that can validate the string and/or you can use CSS

GObject property validation during object construction

2017-06-07 Thread Link Dupont
I have a GObject. struct _MyObject { gchar *foo; }; I set a string property in my class_init with g_param_spec_string. I set the property->cset_nth to a string of valid characters ("abc...xyz"). static void my_object_class_init (MyObjectClass *klass) { GParamSpec

Re: GObject introspection and cairo?

2017-05-09 Thread Nicola Fontana
Il Tue, 09 May 2017 16:39:10 +0200 Stefan Salewski scrisse: > I am currently working again on the gobject introspection based > bindings for Nim language (https://github.com/StefanSalewski/nim-gi). > > And I wonder why there is only minimal support for cairo -- > /usr/share/gi

Re: GObject introspection and cairo?

2017-05-09 Thread Emmanuele Bassi
On 9 May 2017 at 15:39, Stefan Salewski wrote: > I am currently working again on the gobject introspection based > bindings for Nim language (https://github.com/StefanSalewski/nim-gi). > > And I wonder why there is only minimal support for cairo -- > /usr/share/gir-1.0/cairo-1.0

GObject introspection and cairo?

2017-05-09 Thread Stefan Salewski
I am currently working again on the gobject introspection based bindings for Nim language (https://github.com/StefanSalewski/nim-gi). And I wonder why there is only minimal support for cairo -- /usr/share/gir-1.0/cairo-1.0.gir is minimal. Of course cairo is not gobject based, but is that the

Re: gobject-introspection unmaintained?

2017-02-19 Thread Stefan Salewski
ox, I thought I was doing something wrong. But it is already reported in bug696935 -- one of 283 open bugs. But in spite of that, gobject introspection seems to be a very useful tool. Rust people seems to use it too. ___ gtk-list mailing list gtk-list@gnome.o

Re: gobject-introspection unmaintained?

2017-02-13 Thread Emmanuele Bassi
On 13 February 2017 at 11:19, Stefan Salewski wrote: > Is gobject-introspection unmaintained? It's not heavily maintained, but it's not unmaintained either. > I found a github reposity at > > https://github.com/GNOME/gobject-introspection The GitHub GNOME organiz

gobject-introspection unmaintained?

2017-02-13 Thread Stefan Salewski
Is gobject-introspection unmaintained? I found a github reposity at https://github.com/GNOME/gobject-introspection but the issue tracker is disabled. As you may know, I have done some work on a higher level GTK Nim wrapper recently. Starting with the API docs https://developer.gnome.org/gi

GObject Introspection, g-field-info-get-size

2017-02-08 Thread Stefan Salewski
https://developer.gnome.org/gi/1.50/gi-GIFieldInfo.html#g-field-info-get-size Is someone still familiar with GObject Introspection? I am investigating creating high level GObject Introspection based Nim bindings. Most seems to work well, some not: For example g-field-info-get-size() seems to

Re: gobject

2016-10-20 Thread Timothy Ward
> > That's the rub: writing down what the boilerplate code is means that > we commit to it for all eternity — or, at least, until a major API > break. > > The whole idea of using the macros is not just to avoid the > boilerplate: is to make it irrelevant to know what the boilerpl

Re: gobject

2016-10-20 Thread Emmanuele Bassi
l a major API break. The whole idea of using the macros is not just to avoid the boilerplate: is to make it irrelevant to know what the boilerplate does, unless you're literally hacking on the type system itself. Given that GObject is mostly based on conventions more than API, to make up from la

Re: gobject

2016-10-20 Thread Timothy Ward
referenced docs are good but only up to a point. > > Patches are very welcome; we recently landed a whole review of the > GObject tutorial, and feedback helps improving the documentation. > > > > > Their seems to be two methods used A) one that used a boiler plate >

Re: gobject

2016-10-20 Thread Emmanuele Bassi
Hi; you should probably try and keep the thread, instead of breaking with every new email. On 20 October 2016 at 11:32, Timothy Ward wrote: > The referenced docs are good but only up to a point. Patches are very welcome; we recently landed a whole review of the GObject tutorial, and feedb

Re: gobject

2016-10-20 Thread Timothy Ward
. Gobject destruction is not fully described as when object dispose and object finalize should be used for an given Gobjects destruction and examples of correct use. Regards Tim ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org

Re: gobject

2016-10-12 Thread A. Walton
On Wed, Oct 12, 2016 at 7:41 AM, Timothy Ward wrote: > Is there a good tutorial or reference material on gtk gobject "c" > coding. > > 1) Explaining in detail the whole process from what should be in > header files and source files, structure declarations, boiler p

Re: gobject

2016-10-12 Thread Nicola Fontana
Il Thu, 13 Oct 2016 01:41:03 +1100 Timothy Ward scrisse: > Is there a good tutorial or reference material on gtk gobject "c" > coding. > > 1) Explaining in detail the whole process from what should be in > header files and source files, structure declarations, boiler p

gobject

2016-10-12 Thread Timothy Ward
Is there a good tutorial or reference material on gtk gobject "c" coding. 1) Explaining in detail the whole process from what should be in header files and source files, structure declarations, boiler plate code the stages of object creation and dispose and finalize functions. What eac

gtk-update-icon-cache : GLib-GObject-CRITICAL

2016-04-01 Thread FAURE, MAXIMILIEN
he:36503888): GLib-GObject-CRITICAL **: gtype.c:2722: You forgot to call g_type_init() (process:36503888): GLib-CRITICAL **: file gthread.c: line 713: assertion `result != 0' failed (gtk-update-icon-cache:36503888): GLib-GObject-CRITICAL **: file gobject.c: line 1547: assertion `G_TYPE_IS_OBJ

Building gobject-introspection on Darwin

2014-07-28 Thread Ed Mansky
Hi all, I am trying to build gobject-introspection 1.34.2 with support for glib 2.35.9. I have glib 2.35.9 installed and am getting stuck on the part of the Makefile for gobject-introspection involving the checking for the required shell env variables. The make command doesn't seem t

install gobject-introspection

2013-07-20 Thread Kemin Zhou
Hi Friends, I am not a Gnome developer.  I was simply trying to install Workrave in my new linux machine.  I don't think that there is a static linked binary for workrave.  At least I search and did not find one.  So I have to build it.  One of the dependency on GTK+ is the go

Re: GObject Destruction

2013-01-18 Thread Ian Liu Rodrigues
Sorry for the late response, the email got lost in my messy inbox. On Mon, Dec 24, 2012 at 7:20 PM, David Nečas wrote: > Yes and no. You can do this > > g_signal_connect(object, "signal", G_CALLBACK(g_object_unref), NULL); > > and it will unref the object when the signal is emitted. However

Re: GObject Destruction

2012-12-24 Thread David Nečas
On Mon, Dec 24, 2012 at 06:22:02PM -0200, Ian Liu Rodrigues wrote: > I was wondering if this GObject destruction scheme allows destroying an > object in a callback for a signal of itself. Yes and no. You can do this g_signal_connect(object, "signal", G_CALLBACK(g_object_unr

Re: GObject Destruction

2012-12-24 Thread Ian Liu Rodrigues
I was wondering if this GObject destruction scheme allows destroying an object in a callback for a signal of itself. Is this possible? Sorry for the slight of topic! Merry Christmas, Ian Liu. On Dec 24, 2012 9:38 AM, "David Nečas" wrote: > On Wed, 19 Dec 2012 18:55:40 +0100, N

Re: GObject Destruction

2012-12-24 Thread David Nečas
object lifetime. I.e. all data would require the NULL protection, even those that do not require it in the current scheme. (b) Teaching GObject how to free the internal data of your object. But wait, there is already a method that lets GObject do this: it is called finalize(). [*]

Re: GObject Destruction

2012-12-19 Thread Nicola Fontana
ect that returns X,Y by directly accessing the fields in the instance struct (hence not passing throught the gobject property mechanism). In this case using finalize() would be acceptable. Ciao. -- Nicola ___ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list

Re: GObject Destruction

2012-12-18 Thread Jasper St. Pierre
If you're using GSlice on a dynamically-sized array, you are using GSlice wrong. This is not what GSlice was designed for and you will cause fragmentation. The case for munmap is better, but again, I'd just store the overall size of the region, rather than calculating it again. On Tue, Dec 18, 2

Re: GObject Destruction

2012-12-18 Thread David Nečas
On Tue, Dec 18, 2012 at 05:37:08PM -0500, Jasper St. Pierre wrote: > The call for freeing a block of memory is free(void *data); And the call for freeing a GSlice-allocated block of memory is void g_slice_free1(gsize block_size, gpointer mem_block); And the call for freeing a memory-mapped r

Re: GObject Destruction

2012-12-18 Thread Jasper St. Pierre
"x", &x, NULL); > > > > > > On Tue, Dec 18, 2012 at 4:57 AM, Günther Wutz > > wrote: > > Hi, > > > > i have read the development stuff about GObject > > initialization and >

Re: GObject Destruction

2012-12-18 Thread Günther Wutz
012 at 4:57 AM, Günther Wutz > wrote: > Hi, > > i have read the development stuff about GObject > initialization and > destruction of an Object. But i have currently a > problem, which drives &

Re: GObject Destruction

2012-12-18 Thread David Nečas
On Tue, Dec 18, 2012 at 08:45:42PM +0100, Nicola Fontana wrote: > I always wondered if this double step finalization is hystorical > craft. Why not drop finalize() altogether and avoid double dispose > calls directly from libgobject? The purpose of dispose() is to break reference cycles, i.e. to e

Re: GObject Destruction

2012-12-18 Thread Nicola Fontana
ld have a still valid instance to query. > > GObject gives the following, somewhat contradictory, requirements for > dispose(): > > When dispose ends, the object should not hold any reference to any > other member object. The object is also expected to be able to >

Re: GObject Destruction

2012-12-18 Thread David Nečas
On Tue, Dec 18, 2012 at 07:19:33PM +0100, Nicola Fontana wrote: > I always free dynamic stuff (included allocated memory) in > dispose(), not in finalize(), protecting it from double calls. > There you should have a still valid instance to query. GObject gives the following,

Re: GObject Destruction

2012-12-18 Thread Nicola Fontana
Il Tue, 18 Dec 2012 04:57:52 +0100 Günther Wutz scrisse: > I have an Class A, which stores two Integer as properties (say x and y) > and an Class B which inherits from A and makes a multidimensional array > on the heap with size x*y. In my finalize method i want to free the > dynamically allocate

Re: GObject Destruction

2012-12-18 Thread Jasper St. Pierre
anest solution to me. On Tue, Dec 18, 2012 at 5:22 AM, Milosz Derezynski wrote: > Use g_object_get(CAST_TO_PARENT_TYPE(obj), "x", &x, NULL); > > > On Tue, Dec 18, 2012 at 4:57 AM, Günther Wutz wrote: > >> Hi, >> >> i have read the development stuff a

Re: GObject Destruction

2012-12-18 Thread Milosz Derezynski
Use g_object_get(CAST_TO_PARENT_TYPE(obj), "x", &x, NULL); On Tue, Dec 18, 2012 at 4:57 AM, Günther Wutz wrote: > Hi, > > i have read the development stuff about GObject initialization and > destruction of an Object. But i have currently a problem, which drives > me

Re: GObject Destruction

2012-12-17 Thread Jasper St. Pierre
Store X/Y in class B. On Mon, Dec 17, 2012 at 10:57 PM, Günther Wutz wrote: > Hi, > > i have read the development stuff about GObject initialization and > destruction of an Object. But i have currently a problem, which drives > me crazy. > > I have an Class A, which

GObject Destruction

2012-12-17 Thread Günther Wutz
Hi, i have read the development stuff about GObject initialization and destruction of an Object. But i have currently a problem, which drives me crazy. I have an Class A, which stores two Integer as properties (say x and y) and an Class B which inherits from A and makes a multidimensional array

Re: Help on GObject Introspection Annotations

2011-12-02 Thread Tal Liron
Thanks! I'll add my own git example to the list: https://github.com/tliron/pygobject-example While there are a lot of PyGObject tutorials out there that show how to use GTK+3, there are none that show the complete loop of writing your own GObject code in

Re: Help on GObject Introspection Annotations

2011-12-02 Thread Daniel Espinosa
ng Vala. > In Vala, implementing properties is ridiculously easy. > > I'm hoping in the future GI will support fields better. The project is > definitely evolving and adding features. > > On 12/02/2011 02:32 PM, Daniel Espinosa wrote: > > In GdaNumeric, we added acc

Re: Help on GObject Introspection Annotations

2011-12-02 Thread Daniel Espinosa
In GdaNumeric, we added accesors to fields in the struct. I think you have a GObject implementation. Your way is the best: add properties to access to fields. GdaNumeric is a struct with some fields easy to modify directly from Python, like the integer ones, but the string one is not handle by

Re: Help on GObject Introspection Annotations

2011-12-02 Thread Daniel Espinosa
No one have sent any response message. I've added this annotations to GdaNumeric, but GIR and Vala bindings make no difference. Both use GdaNumeric, as declared on GDA, as a GBoxed and use g_boxed_copy and g_boxed_free functions. May be this help was added but not implemented jet. 2011/12/2 Tal

Help on GObject Introspection Annotations

2011-10-21 Thread Daniel Espinosa
Resently has been added the following annotations for gtk-doc headings: Set value func: Get value func: in GDA we have a GdaNumeric struct with gda_value_set_numeric and gda_value_get_numeric to set this Boxed Derived type to a GValue is it correct to add the following annotations: /** * GdaNum

Re: gobject-introspection and MinGW

2011-10-20 Thread Earnie
Dieter Verfaillie wrote: >> Such things as needing to convert \\ to / > > Are you still getting those even with os.path.join() being > monkey-patched? From my windows branch: > https://github.com/dieterv/gobject-introspection/commit/75ff95092d952c0e4aa17ad58de5a02da54c1240 I&#

Re: gobject-introspection and MinGW

2011-10-18 Thread Dieter Verfaillie
my windows branch: https://github.com/dieterv/gobject-introspection/commit/75ff95092d952c0e4aa17ad58de5a02da54c1240 mvg, Dieter ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list

Re: gobject-introspection and MinGW

2011-10-18 Thread Earnie
Dieter Verfaillie wrote: > On 15/10/2011 18:49, Earnie wrote: >> I'm building gobject-introspection-1.30.0 with MSYS and MinGW. I'm >> to the point of the GISCAN GLib-2.0.gir and it reports "No >> mscvr71.dll loaded." I'm using the python.org provided

Re: gobject-introspection and MinGW

2011-10-17 Thread Dieter Verfaillie
On 15/10/2011 18:49, Earnie wrote: > I'm building gobject-introspection-1.30.0 with MSYS and MinGW. I'm to > the point of the GISCAN GLib-2.0.gir and it reports "No mscvr71.dll > loaded." I'm using the python.org provided Windows distribution version > 2.7.

Re: gobject-introspection and MinGW

2011-10-17 Thread Earnie
Earnie wrote: > Earnie wrote: >> Earnie wrote: >>> I'm building gobject-introspection-1.30.0 with MSYS and MinGW. >>> I'm to the point of the GISCAN GLib-2.0.gir and it reports "No >>> mscvr71.dll loaded." I'm using the python.org provi

Re: gobject-introspection and MinGW

2011-10-16 Thread Earnie
Earnie wrote: > Earnie wrote: >> I'm building gobject-introspection-1.30.0 with MSYS and MinGW. I'm >> to the point of the GISCAN GLib-2.0.gir and it reports "No >> mscvr71.dll loaded." I'm using the python.org provided Windows >> distribution v

Re: gobject-introspection and MinGW

2011-10-15 Thread Earnie
Earnie wrote: > I'm building gobject-introspection-1.30.0 with MSYS and MinGW. I'm > to the point of the GISCAN GLib-2.0.gir and it reports "No > mscvr71.dll loaded." I'm using the python.org provided Windows > distribution version 2.7. I had to modify the hac

gobject-introspection and MinGW

2011-10-15 Thread Earnie
I'm building gobject-introspection-1.30.0 with MSYS and MinGW. I'm to the point of the GISCAN GLib-2.0.gir and it reports "No mscvr71.dll loaded." I'm using the python.org provided Windows distribution version 2.7. I had to modify the hack in giscanner/utils.py at l

GObject Introspection annotation doesn't work for container type

2011-09-02 Thread Daniel Espinosa
I've filed bug #657743, because I have an struct with a GSList to contain another struct type element. I've added (element-type Gda.SqlSelectTarget) annotation to gtk-doc as shown, but generated GIR doesn't set ctype: to GdaSqlSelectFrom, instead use gpointer. /** * GdaSqlSelectFrom: * @any: inh

why is my gobject not introspectable with D-Bus?

2011-01-08 Thread matthieu paindavoine
Hello, I am working through the first steps of publishing a GObject on the session dbus. I can't seem to be doing that correctly, since when I try to list the top level objects of the service, I am getting an error: $> dbus-send --print-reply=literal --session --dest="o

Drag and Drop with GObject introspection

2010-08-09 Thread Mathias Brodala
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi. We recently did some experiments with porting PyGtk code to PyGi and stumbled over the Drag and Drop handling. In PyGtk nothing more than the following is required to allow a tree view to handle file drops: > view = gtk.TreeView() > > view.drag_d

Re: GLib-GObject-CRITICAL after make install glib-2.22.4

2010-02-23 Thread Tadej Borovšak
Hello. > It say need newer version gtk+ library, so I go to download gtk+ tarball too. > And make install it. > > When glib-2.22.4 install finish, I attend LXDE's deb files for install, I add > lxde apt information and use apt-get install lxde. How did you install all of this stuff? More exactl

GLib-GObject-CRITICAL after make install glib-2.22.4

2010-02-23 Thread UGP
eter[31250]: GLib-GObject-CRITICAL: g_object_get_qdata: assertion `G_IS_OBJECT (object)' failed Feb 9 00:19:19 ugplinux gdmgreeter[31250]: GLib-GObject-CRITICAL: g_object_set_qdata_full: assertion `G_IS_OBJECT (object)' failed Feb 9 00:32:22 ugplinux gdmgreeter[402]: GLib-GObject-CR

GObject static checker

2010-02-07 Thread David Nečas
Hello, can some static C code analysis tool that check things such as that whatever_finalize() chains to parent's finalize()? Yeti ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list

Re: using gobject without gtk

2010-01-22 Thread Jean Bréfort
Le vendredi 22 janvier 2010 à 21:18 +0100, Martin Kalbfuß a écrit : > Hi, > > I want to use gobject for an extension of the allegro library. Without > touching gtk+. > > When I compile my test program. I get > > (process:17961): GLib-GObject-CRITICAL > **: > /buil

Re: using gobject without gtk

2010-01-22 Thread Jiří Zárevúcky
Martin Kalbfuß píše v Pá 22. 01. 2010 v 21:18 +0100: > Hi, > > I want to use gobject for an extension of the allegro library. Without > touching gtk+. > > When I compile my test program. I get > > (process:17961): GLib-GObject-CRITICAL > **: > /build/buildd-glib2.

using gobject without gtk

2010-01-22 Thread Martin Kalbfuß
Hi, I want to use gobject for an extension of the allegro library. Without touching gtk+. When I compile my test program. I get (process:17961): GLib-GObject-CRITICAL **: /build/buildd-glib2.0_2.22.4-1-i386-jRfNZE/glib2.0-2.22.4/gobject/gtype.c:2458: initialization assertion failed, use

Re: gobject ref and unref ?

2009-11-10 Thread Siddu
That was pretty neat thanks. On 11/10/09, Tadej Borovšak wrote: > Hello. > >> Is there any documentation available for it ? as to when to ref and >> unref it based upon the api's ? > > You don't need to know those things, since object's total reference > count is of no importance to you. All yo

Re: gobject ref and unref ?

2009-11-10 Thread David Nečas
Please don't cross-post. On Tue, Nov 10, 2009 at 11:14:24PM +0530, Siddu wrote: > How does one get to know if an API is adding a reference of its own to > an object References represent ownership. Hence a reference is added if you provide an object to be taken and used later. Most methods that

Re: gobject ref and unref ?

2009-11-10 Thread Tadej Borovšak
Hello. > Is there any documentation available for it ? as to when to ref and > unref it based upon the api's ? You don't need to know those things, since object's total reference count is of no importance to you. All you need to do is keep track of your own references on an object. Let me explain

gobject ref and unref ?

2009-11-10 Thread Siddu
Hi all, How does one get to know if an API is adding a reference of its own to an object Passed as a Parameter and thereby incrementing the ref_count ? Is there any documentation available for it ? as to when to ref and unref it based upon the api's ? For example in the below code gtk_tree

gobject memory layout.

2009-11-06 Thread Germán Diago
Hello. I would like to know it this is possible: 1.- Have a c++ object implemented, which is derived from GObject. 2.- This object will have a vtable (virtual destructor, etc.) 3.- Usable from Glade, which uses C API instance to set and get properties. Because when I make my type have a vtable

Gobject construction for bindings.

2009-11-04 Thread Germán Diago
Hello. I'm trying to implement a registration system for gobjects from c++. I know the existence of gtkmm, but it's not enough for my purposes. So I want to know the following. I have the GTypeInfo structure, which I have to fill so that I can use my Gobjects from c++ and have them registered in t

Re: all about gobject references

2009-08-22 Thread David Nečas
On Sat, Aug 22, 2009 at 09:01:43PM +0200, fidel wrote: > A little off-topic, resp. about a similar issue, but I haven't found any > reason for it: > I read about using g_mem_set_vtable( glib_mem_profiler_table ) and using > g_atexit( g_mem_profile ). Even in this short example, I still get > memory

Re: all about gobject references

2009-08-22 Thread fidel
A little off-topic, resp. about a similar issue, but I haven't found any reason for it: I read about using g_mem_set_vtable( glib_mem_profiler_table ) and using g_atexit( g_mem_profile ). Even in this short example, I still get memory leaks reported: #include #include #include

Re: all about gobject references

2009-08-22 Thread Emmanuel Rodriguez
On Sat, Aug 22, 2009 at 3:12 PM, Tadej Borovšak wrote: > Hi > > > but when i put it throught valgrind tool it says 156 bytes loss in memory > > Analyzing glib code with valgrind requires some preparation or false > positives are reported. Ask your favorite search engine about this and > you shoul

Re: all about gobject references

2009-08-22 Thread Tadej Borovšak
Hi > but when i put it throught valgrind tool it says 156 bytes loss in memory Analyzing glib code with valgrind requires some preparation or false positives are reported. Ask your favorite search engine about this and you should be able to find some documentation. Tadej -- Tadej Borovšak 0038

Re: all about gobject references

2009-08-22 Thread Siddu
On Sat, Aug 22, 2009 at 5:51 PM, Tadej Borovšak wrote: > Hi. > > > but still after reading thoroughly i am unable to figure out why the > > ref_count would be "4" for gtk_window_new() call ? > > After gtk_window_new call, refcount is 1. Additional references are > added by callback mechanism. (T

Re: all about gobject references

2009-08-22 Thread Tadej Borovšak
Hi. > but still after reading thoroughly  i am unable to figure out why the > ref_count would be "4" for gtk_window_new() call ? After gtk_window_new call, refcount is 1. Additional references are added by callback mechanism. (Try adding print statement right after the creation and you'll see.)

Re: all about gobject references

2009-08-22 Thread Siddu
On Sat, Aug 22, 2009 at 5:45 PM, Siddu wrote: > > > On Sat, Aug 22, 2009 at 5:24 PM, Tadej Borovšak wrote: > >> Hi. >> >> >> Hi all, >> >> I want understand Gobject in its entirety . mostly about references >> >> (floating

Re: all about gobject references

2009-08-22 Thread Tadej Borovšak
Hi. >> Hi all, >> I want understand Gobject in its entirety . mostly  about references >> (floating, weak , not so weak) and *memory management* . Is there any >> pointers you could point me to read . I wrote a simple forum post about this issue a while ago that shou

Re: all about gobject references

2009-08-22 Thread Siddu
On Sat, Aug 22, 2009 at 5:10 PM, Siddu wrote: > Hi all, > I want understand Gobject in its entirety . mostly about references > (floating, weak , not so weak) and *memory management* . Is there any > pointers you could point me to read . > As a part of the above question the f

all about gobject references

2009-08-22 Thread Siddu
Hi all, I want understand Gobject in its entirety . mostly about references (floating, weak , not so weak) and *memory management* . Is there any pointers you could point me to read . -- Regards, ~Sid~ I have never met a man so ignorant that i couldn't learn something fro

How to write a Class(gobject) in a thread safe way?

2009-04-25 Thread Peter Cai
/* I wrote a class to encapsulate a GString as a buffer. * I want to make it both thread safe and efficient. I need several buffers * like this, so I don't want a global mutex to lock every instance of my buffer * class. So I add a mutex as private member. * * But when I need to free my obje

  1   2   3   4   >