[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-devel
Subject:    Re: Script to build templates for H and C files
From:       Pavlo Solntsev <pavlo.solntsev () gmail ! com>
Date:       2018-01-08 19:52:18
Message-ID: CADsq9ipGO9gaLqNnqEk0p8SdX5CBx7jK0bpnPucgDB1uDBnoQg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks, Emmanuele.

turbine actually very similar to what I have been doing. I will play with
different options you mentioned.

-Pavlo Solntsev
---------------------------------------------------------------------------------------------

*Please avoid sending me Word or PowerPoint attachments.See
http://www.gnu.org/philosophy/no-word-attachments.html
<http://www.gnu.org/philosophy/no-word-attachments.html>*

On Mon, Jan 8, 2018 at 1:37 PM, Emmanuele Bassi <ebassi@gmail.com> wrote:

> Hi;
>
> creating GObject classes with modern best practices is matter of calling:
>
>   G_DECLARE_FINAL_TYPE
>
> or:
>
>   G_DECLARE_DERIVABLE_TYPE
>
> in your header file, and:
>
>   G_DEFINE_TYPE
>
> in your source file. Anything else is usually dependent on what your
> class is going to contain; properties? Signals? A custom constructor?
> Private data? A singleton pattern for g_object_new()?
>
> Templating will get you only as far as you're going to make the
> template flexible enough.
>
> On 8 January 2018 at 19:07, Pavlo Solntsev <pavlo.solntsev@gmail.com>
> wrote:
>
> > I am open to comments and critics. Any suggestions are very welcome. I am
> > more than willing to see a tool like that as part of the glib library.
>
> You probably want to look at GNOME Builder's snippet functionality, if
> you want to generate code.
>
> Additionally, we had a UI tool ages ago called "Turbine", which was
> fairly flexible:
>
> https://git.gnome.org//browse/turbine
>
> You could fork it and update its templates. to follow best practices
>
> In general, though, I don't think we're going to have this tool
> shipped as part of GLib; after all, we have never landed an interface
> definition language to generate code either.
>
> Ciao,
>  Emmanuele.
>
> --
> https://www.bassi.io
> [@] ebassi [@gmail.com]
>

[Attachment #5 (text/html)]

<div dir="ltr">Thanks, Emmanuele.<div><br></div><div>turbine actually very similar to \
what I have been doing. I will play with different options you mentioned.  \
</div></div><div class="gmail_extra"><br clear="all"><div><div \
class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr">-Pavlo Solntsev</div><div \
dir="ltr">---------------------------------------------------------------------------------------------</div></div><div \
dir="ltr"><em style="color:rgb(0,0,0);font-family:&quot;Times New \
Roman&quot;;font-size:16px">Please avoid sending me Word or PowerPoint \
attachments.<br>See <a href="http://www.gnu.org/philosophy/no-word-attachments.html" \
target="_blank">http://www.gnu.org/philosophy/no-word-attachments.html</a></em><br></div></div></div></div></div></div>
 <br><div class="gmail_quote">On Mon, Jan 8, 2018 at 1:37 PM, Emmanuele Bassi <span \
dir="ltr">&lt;<a href="mailto:ebassi@gmail.com" \
target="_blank">ebassi@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hi;<br> <br>
creating GObject classes with modern best practices is matter of calling:<br>
<br>
   G_DECLARE_FINAL_TYPE<br>
<br>
or:<br>
<br>
   G_DECLARE_DERIVABLE_TYPE<br>
<br>
in your header file, and:<br>
<br>
   G_DEFINE_TYPE<br>
<br>
in your source file. Anything else is usually dependent on what your<br>
class is going to contain; properties? Signals? A custom constructor?<br>
Private data? A singleton pattern for g_object_new()?<br>
<br>
Templating will get you only as far as you&#39;re going to make the<br>
template flexible enough.<br>
<span class=""><br>
On 8 January 2018 at 19:07, Pavlo Solntsev &lt;<a \
href="mailto:pavlo.solntsev@gmail.com">pavlo.solntsev@gmail.com</a>&gt; wrote:<br> \
<br> &gt; I am open to comments and critics. Any suggestions are very welcome. I \
am<br> &gt; more than willing to see a tool like that as part of the glib \
library.<br> <br>
</span>You probably want to look at GNOME Builder&#39;s snippet functionality, if<br>
you want to generate code.<br>
<br>
Additionally, we had a UI tool ages ago called &quot;Turbine&quot;, which was<br>
fairly flexible:<br>
<br>
<a href="https://git.gnome.org//browse/turbine" rel="noreferrer" \
target="_blank">https://git.gnome.org//browse/<wbr>turbine</a><br> <br>
You could fork it and update its templates. to follow best practices<br>
<br>
In general, though, I don&#39;t think we&#39;re going to have this tool<br>
shipped as part of GLib; after all, we have never landed an interface<br>
definition language to generate code either.<br>
<br>
Ciao,<br>
  Emmanuele.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
<a href="https://www.bassi.io" rel="noreferrer" \
target="_blank">https://www.bassi.io</a><br> [@] ebassi [@<a href="http://gmail.com" \
rel="noreferrer" target="_blank">gmail.com</a>]<br> \
</font></span></blockquote></div><br></div>



_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic