[LAD] C/gtk3/cairo meter widget

Patrick Shirkey pshirkey at boosthardware.com
Tue Feb 12 08:56:21 UTC 2013


On Tue, February 12, 2013 3:50 am, Paul Davis wrote:
> On Mon, Feb 11, 2013 at 11:44 AM, Patrick Shirkey <
> pshirkey at boosthardware.com> wrote:
>
>>
>> Thanks for the tip. Will save me some braincells.
>>
>> Found it here:
>>
>>
>> http://guitarix.sourcearchive.com/documentation/0.10.0-2/GtkFastMeter_8cpp-source.html
>>
>> http://guitarix.sourcearchive.com/documentation/0.10.0-2/GtkFastMeter_8h-source.html
>>
>
> the code in ardour3 doesn't use pixbufs and is entirely drawn directly
> with
> cairo. you may or may not care.
>

It's a multistep process to get it all integrated. I couldn't find
anything specific online for making a custom widget with gtk3 so I have
copied the structure and methods from the gtkscale/gtkrange widgets.

http://git.gnome.org/browse/gtk+/tree/gtk/gtkscale.c?h=gtk-3-6
http://git.gnome.org/browse/gtk+/tree/gtk/gtkrange.c?h=gtk-3-6

I got it to the point where it the class is building and init() is being
called but I am having a problem with assigning the correct TYPE for
GTK_METER and getting the draw/realize methods to fire.

http://boosthardware.com/code/jamin/

If anyone feels like chipping in some suggestions for how to get past this
step I'm all ears :-)

http://developer.gnome.org/gobject/stable/howto-interface-implement.html
http://developer.gnome.org/gobject/stable/gobject-Type-information.html



--
Patrick Shirkey
Boost Hardware Ltd


More information about the Linux-audio-dev mailing list