Re: [LAD] C/gtk3/cairo meter widget

2013-02-13 Thread Patrick Shirkey
Hi,

FYI, I have updated the class with some basic structure for adding
different cairo drawing functions. If anyone wants to take a look at the
code and make improvements feel free. I haven't added the fastmeter logic
yet.

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

You can call it like this:

#include 

GtkWidget *gtkmeter;
GtkAdjustment *adjustment = (GtkAdjustment*) gtk_adjustment_new(0.0, -40,
6, 0.0, 0.0, 0.0);

meter = gtk_meter_net(adjustment, GTK_METER_UP,  GTK_METERSCALE_TOP. -40, 6);
gtk_meter_set_adjustment(GTK_METER (meter), adjustment);


- I have added it to the gtk3 port of JAMin which you can download from
http://jamin.sf.net to see it in action.  It's all in the git repo.

Check these files for more advanced examples:

callbacks.c
interface.c
gtkmeter.c
intrim.c
compressor-ui.c


I'll put together a README when I have some more time.



--
Patrick Shirkey
Boost Hardware Ltd
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] C/gtk3/cairo meter widget

2013-02-13 Thread Patrick Shirkey

On Thu, February 14, 2013 9:15 am, Tristan Matthews wrote:
> 2013/2/13 Patrick Shirkey :
>>
>> On Thu, February 14, 2013 3:43 am, Patrick Shirkey wrote:
>>> On Tue, February 12, 2013 9:00 pm, SxDx wrote:
 On 02/12/2013 09:56 AM, Patrick Shirkey wrote:
>
> On Tue, February 12, 2013 3:50 am, Paul Davis wrote:
>> On Mon, Feb 11, 2013 at 11:44 AM, Patrick Shirkey <
>> pshir...@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/

 Can you provide a small main.c or something?
 All I see in there are static init functions never called.

>>>
>>> Yeah it's just the class, no wrapping.
>>>
>>> It can be called like this:
>>>
>>> GtkWidget *gtkmeter;
>>> GtkAdjustment *adjustment = (GtkAdjustment*) gtk_adjustment_new(0.0,
>>> -40,
>>> 6, 0.0, 0.0, 0.0);
>>>
>>> meter = gtk_meter_net(adjustment, GTK_METER_UP,  0. -40, 6);
>>>
>>>
>>
>>
>> Turns out there were a couple of small items that needed to be changed.
>> I
>> had to disable the additional params in the call to g_object_new() in
>> gtk_meter_init() and fix the Type Declaration.
>>
>> I have updated the files.http://boosthardware.com/code/jamin/
>>
>> At the moment I have a meter that doesn't update which shouldn't take
>> long
>> to fix. However what I am aiming for is to integrate the different cairo
>> meters into one class.
>>
>> fastmeter - ardour
>> vumeter - scenic
>> GtkMeter - jackeq
>
> I would recommend avoiding subclassing, if possible, and maybe install
> a "render-style" property for your object which will determine which
> drawing code to call. Maybe it's not as easy as that though.
>

That can be done.

Just need a switch for the different draw code.




--
Patrick Shirkey
Boost Hardware Ltd
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] C/gtk3/cairo meter widget

2013-02-13 Thread Tristan Matthews
2013/2/13 Patrick Shirkey :
>
> On Thu, February 14, 2013 3:43 am, Patrick Shirkey wrote:
>> On Tue, February 12, 2013 9:00 pm, SxDx wrote:
>>> On 02/12/2013 09:56 AM, Patrick Shirkey wrote:

 On Tue, February 12, 2013 3:50 am, Paul Davis wrote:
> On Mon, Feb 11, 2013 at 11:44 AM, Patrick Shirkey <
> pshir...@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/
>>>
>>> Can you provide a small main.c or something?
>>> All I see in there are static init functions never called.
>>>
>>
>> Yeah it's just the class, no wrapping.
>>
>> It can be called like this:
>>
>> GtkWidget *gtkmeter;
>> GtkAdjustment *adjustment = (GtkAdjustment*) gtk_adjustment_new(0.0, -40,
>> 6, 0.0, 0.0, 0.0);
>>
>> meter = gtk_meter_net(adjustment, GTK_METER_UP,  0. -40, 6);
>>
>>
>
>
> Turns out there were a couple of small items that needed to be changed. I
> had to disable the additional params in the call to g_object_new() in
> gtk_meter_init() and fix the Type Declaration.
>
> I have updated the files.http://boosthardware.com/code/jamin/
>
> At the moment I have a meter that doesn't update which shouldn't take long
> to fix. However what I am aiming for is to integrate the different cairo
> meters into one class.
>
> fastmeter - ardour
> vumeter - scenic
> GtkMeter - jackeq

I would recommend avoiding subclassing, if possible, and maybe install
a "render-style" property for your object which will determine which
drawing code to call. Maybe it's not as easy as that though.

Best,
Tristan

>
> Any ideas or suggestions on how to make that work for the GtkMeter class?
>
>
>
>
>
> --
> Patrick Shirkey
> Boost Hardware Ltd
> ___
> Linux-audio-dev mailing list
> Linux-audio-dev@lists.linuxaudio.org
> http://lists.linuxaudio.org/listinfo/linux-audio-dev



-- 
Tristan Matthews
web: http://tristanswork.blogspot.com
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] C/gtk3/cairo meter widget

2013-02-13 Thread Patrick Shirkey

On Thu, February 14, 2013 3:43 am, Patrick Shirkey wrote:
> On Tue, February 12, 2013 9:00 pm, SxDx wrote:
>> On 02/12/2013 09:56 AM, Patrick Shirkey wrote:
>>>
>>> On Tue, February 12, 2013 3:50 am, Paul Davis wrote:
 On Mon, Feb 11, 2013 at 11:44 AM, Patrick Shirkey <
 pshir...@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/
>>
>> Can you provide a small main.c or something?
>> All I see in there are static init functions never called.
>>
>
> Yeah it's just the class, no wrapping.
>
> It can be called like this:
>
> GtkWidget *gtkmeter;
> GtkAdjustment *adjustment = (GtkAdjustment*) gtk_adjustment_new(0.0, -40,
> 6, 0.0, 0.0, 0.0);
>
> meter = gtk_meter_net(adjustment, GTK_METER_UP,  0. -40, 6);
>
>


Turns out there were a couple of small items that needed to be changed. I
had to disable the additional params in the call to g_object_new() in
gtk_meter_init() and fix the Type Declaration.

I have updated the files.http://boosthardware.com/code/jamin/

At the moment I have a meter that doesn't update which shouldn't take long
to fix. However what I am aiming for is to integrate the different cairo
meters into one class.

fastmeter - ardour
vumeter - scenic
GtkMeter - jackeq

Any ideas or suggestions on how to make that work for the GtkMeter class?





--
Patrick Shirkey
Boost Hardware Ltd
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] C/gtk3/cairo meter widget

2013-02-13 Thread Patrick Shirkey
On Tue, February 12, 2013 9:00 pm, SxDx wrote:
> On 02/12/2013 09:56 AM, Patrick Shirkey wrote:
>>
>> On Tue, February 12, 2013 3:50 am, Paul Davis wrote:
>>> On Mon, Feb 11, 2013 at 11:44 AM, Patrick Shirkey <
>>> pshir...@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/
>
> Can you provide a small main.c or something?
> All I see in there are static init functions never called.
>

Yeah it's just the class, no wrapping.

It can be called like this:

GtkWidget *gtkmeter;
GtkAdjustment *adjustment = (GtkAdjustment*) gtk_adjustment_new(0.0, -40,
6, 0.0, 0.0, 0.0);

meter = gtk_meter_net(adjustment, GTK_METER_UP,  0. -40, 6);






--
Patrick Shirkey
Boost Hardware Ltd
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] C/gtk3/cairo meter widget

2013-02-12 Thread SxDx

On 02/12/2013 09:56 AM, Patrick Shirkey wrote:


On Tue, February 12, 2013 3:50 am, Paul Davis wrote:

On Mon, Feb 11, 2013 at 11:44 AM, Patrick Shirkey <
pshir...@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/


Can you provide a small main.c or something?
All I see in there are static init functions never called.
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] C/gtk3/cairo meter widget

2013-02-12 Thread Patrick Shirkey

On Tue, February 12, 2013 3:50 am, Paul Davis wrote:
> On Mon, Feb 11, 2013 at 11:44 AM, Patrick Shirkey <
> pshir...@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
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] C/gtk3/cairo meter widget

2013-02-11 Thread brummer-
Hi
There is still the fastmeter in our actuel Source, you can found it in 
guitarix/libgxw 
It's plain c but gtk2.
The c++ wrapper is in libgxwmm.
Sorry for been short and wrong spelling, i hate to wrote on my Mobil.

Hermann



Patrick Shirkey  schrieb:


On Tue, February 12, 2013 12:15 am, James Warden wrote:
>
>
> On Sun, Feb 10, 2013 at 11:36 PM, Patrick Shirkey
>  wrote:
>
>
>>On Mon, February 11, 2013 3:21 pm, Paul Davis wrote:
>>> On Sun, Feb 10, 2013 at 11:16 PM, Patrick Shirkey <
>>> pshir...@boosthardware.com> wrote:
>>>

 On Mon, February 11, 2013 9:47 am, Tristan Matthews wrote:
 > 2013/2/10 Patrick Shirkey 

 > Therè's this one:
 >
 https://github.com/sat-metalab/scenic/blob/master/src/vumeter/vumeter.cpp
 > https://github.com/sat-metalab/scenic/blob/master/src/include/vumeter.h
 >
 > It has only a few c++isms and could easily be purely in C.
 >

 Thanks. It does look useful. Seems to be written for gtk2 though. Have
 you
 compiled it with gtk3?

>>>
>>> at the very least, it would need a draw() method rather than an
>>> expose()
>>> method.
>>>
>>> plus, if i read it correctly it also redraws its entire self (subject
>>> to
>>> cairo clipping) on every expose.
>>>
>>> contrast with the the fastmeter in ardour3's libs/gtkmm2ext which draws
>>> only the changed pixels per expose.
>>>
>>
>>I would prefer to use that but it's in pure C++ as well as GTK2 so I have
>>to convert it to c and gtk3 :-(
>>
>>
>>
>
> Back in the days I had time to help Herman Meyer on his guitarix project,
> I imported ardour's fast meters into C. Guitarix was using the C version
> of gtk. You can look into the old guitarix code in sourceforge (that was a
> long while back, maybe 3-4 years).
>

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



--
Patrick Shirkey
Boost Hardware Ltd
_

Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


-- 
Diese Nachricht wurde von meinem Android Mobiltelefon mit WEB.DE Mail gesendet.
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] C/gtk3/cairo meter widget

2013-02-11 Thread Patrick Shirkey

On Mon, February 11, 2013 10:51 pm, Paul Davis wrote:
> On Sun, Feb 10, 2013 at 11:36 PM, Patrick Shirkey <
> pshir...@boosthardware.com> wrote:
>
>>
>> On Mon, February 11, 2013 3:21 pm, Paul Davis wrote:
>> > On Sun, Feb 10, 2013 at 11:16 PM, Patrick Shirkey <
>> > pshir...@boosthardware.com> wrote:
>> >
>> >>
>> >> On Mon, February 11, 2013 9:47 am, Tristan Matthews wrote:
>> >> > 2013/2/10 Patrick Shirkey 
>> >>
>> >> > Therè's this one:
>> >> >
>> >>
>> https://github.com/sat-metalab/scenic/blob/master/src/vumeter/vumeter.cpp
>> >> >
>> https://github.com/sat-metalab/scenic/blob/master/src/include/vumeter.h
>> >> >
>> >> > It has only a few c++isms and could easily be purely in C.
>> >> >
>> >>
>> >> Thanks. It does look useful. Seems to be written for gtk2 though.
>> Have
>> >> you
>> >> compiled it with gtk3?
>> >>
>> >
>> > at the very least, it would need a draw() method rather than an
>> expose()
>> > method.
>> >
>> > plus, if i read it correctly it also redraws its entire self (subject
>> to
>> > cairo clipping) on every expose.
>> >
>> > contrast with the the fastmeter in ardour3's libs/gtkmm2ext which
>> draws
>> > only the changed pixels per expose.
>> >
>>
>> I would prefer to use that but it's in pure C++ as well as GTK2 so I
>> have
>> to convert it to c and gtk3 :-(
>>
>>
> well it depends on what you want. tristan's has level markings etc. as
> part
> of the meter widget, and is very close to a pure C widget. mine has a very
> efficient and C-ish drawing method that was created with gtk3 in mind.
>
> its not exactly atypical to find that what you want doesn't exist and you
> have to blend bits and piece.
>

Yeah looks like this is going to have to be done the hard way. The
guitarix code is definitely in cCbut it also use gtk_drawable which means
I have to convert it to cairo for gtk3.

So, I guess I will integrate the cairo code from fastmeter with the
"almost" c code from Tristans while using the guitarix port as a reference
 and trying to maintain the structure of hte original gtkmeter from JAMin
:-)

Oh yeah!


--
Patrick Shirkey
Boost Hardware Ltd
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] C/gtk3/cairo meter widget

2013-02-11 Thread Paul Davis
On Mon, Feb 11, 2013 at 11:44 AM, Patrick Shirkey <
pshir...@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.
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] C/gtk3/cairo meter widget

2013-02-11 Thread Patrick Shirkey

On Tue, February 12, 2013 12:15 am, James Warden wrote:
>
>
> On Sun, Feb 10, 2013 at 11:36 PM, Patrick Shirkey
>  wrote:
>
>
>>On Mon, February 11, 2013 3:21 pm, Paul Davis wrote:
>>> On Sun, Feb 10, 2013 at 11:16 PM, Patrick Shirkey <
>>> pshir...@boosthardware.com> wrote:
>>>

 On Mon, February 11, 2013 9:47 am, Tristan Matthews wrote:
 > 2013/2/10 Patrick Shirkey 

 > Therè's this one:
 >
 https://github.com/sat-metalab/scenic/blob/master/src/vumeter/vumeter.cpp
 > https://github.com/sat-metalab/scenic/blob/master/src/include/vumeter.h
 >
 > It has only a few c++isms and could easily be purely in C.
 >

 Thanks. It does look useful. Seems to be written for gtk2 though. Have
 you
 compiled it with gtk3?

>>>
>>> at the very least, it would need a draw() method rather than an
>>> expose()
>>> method.
>>>
>>> plus, if i read it correctly it also redraws its entire self (subject
>>> to
>>> cairo clipping) on every expose.
>>>
>>> contrast with the the fastmeter in ardour3's libs/gtkmm2ext which draws
>>> only the changed pixels per expose.
>>>
>>
>>I would prefer to use that but it's in pure C++ as well as GTK2 so I have
>>to convert it to c and gtk3 :-(
>>
>>
>>
>
> Back in the days I had time to help Herman Meyer on his guitarix project,
> I imported ardour's fast meters into C. Guitarix was using the C version
> of gtk. You can look into the old guitarix code in sourceforge (that was a
> long while back, maybe 3-4 years).
>

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



--
Patrick Shirkey
Boost Hardware Ltd
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] C/gtk3/cairo meter widget

2013-02-11 Thread James Warden


On Sun, Feb 10, 2013 at 11:36 PM, Patrick Shirkey  
wrote:


>On Mon, February 11, 2013 3:21 pm, Paul Davis wrote:
>> On Sun, Feb 10, 2013 at 11:16 PM, Patrick Shirkey <
>> pshir...@boosthardware.com> wrote:
>>
>>>
>>> On Mon, February 11, 2013 9:47 am, Tristan Matthews wrote:
>>> > 2013/2/10 Patrick Shirkey 
>>>
>>> > Therè's this one:
>>> >
>>> https://github.com/sat-metalab/scenic/blob/master/src/vumeter/vumeter.cpp
>>> > https://github.com/sat-metalab/scenic/blob/master/src/include/vumeter.h
>>> >
>>> > It has only a few c++isms and could easily be purely in C.
>>> >
>>>
>>> Thanks. It does look useful. Seems to be written for gtk2 though. Have
>>> you
>>> compiled it with gtk3?
>>>
>>
>> at the very least, it would need a draw() method rather than an expose()
>> method.
>>
>> plus, if i read it correctly it also redraws its entire self (subject to
>> cairo clipping) on every expose.
>>
>> contrast with the the fastmeter in ardour3's libs/gtkmm2ext which draws
>> only the changed pixels per expose.
>>
>
>I would prefer to use that but it's in pure C++ as well as GTK2 so I have
>to convert it to c and gtk3 :-(
>
>
>

Back in the days I had time to help Herman Meyer on his guitarix project, I 
imported ardour's fast meters into C. Guitarix was using the C version of gtk. 
You can look into the old guitarix code in sourceforge (that was a long while 
back, maybe 3-4 years).

J.


___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] C/gtk3/cairo meter widget

2013-02-11 Thread Paul Davis
On Sun, Feb 10, 2013 at 11:36 PM, Patrick Shirkey <
pshir...@boosthardware.com> wrote:

>
> On Mon, February 11, 2013 3:21 pm, Paul Davis wrote:
> > On Sun, Feb 10, 2013 at 11:16 PM, Patrick Shirkey <
> > pshir...@boosthardware.com> wrote:
> >
> >>
> >> On Mon, February 11, 2013 9:47 am, Tristan Matthews wrote:
> >> > 2013/2/10 Patrick Shirkey 
> >>
> >> > Therè's this one:
> >> >
> >>
> https://github.com/sat-metalab/scenic/blob/master/src/vumeter/vumeter.cpp
> >> >
> https://github.com/sat-metalab/scenic/blob/master/src/include/vumeter.h
> >> >
> >> > It has only a few c++isms and could easily be purely in C.
> >> >
> >>
> >> Thanks. It does look useful. Seems to be written for gtk2 though. Have
> >> you
> >> compiled it with gtk3?
> >>
> >
> > at the very least, it would need a draw() method rather than an expose()
> > method.
> >
> > plus, if i read it correctly it also redraws its entire self (subject to
> > cairo clipping) on every expose.
> >
> > contrast with the the fastmeter in ardour3's libs/gtkmm2ext which draws
> > only the changed pixels per expose.
> >
>
> I would prefer to use that but it's in pure C++ as well as GTK2 so I have
> to convert it to c and gtk3 :-(
>
>
well it depends on what you want. tristan's has level markings etc. as part
of the meter widget, and is very close to a pure C widget. mine has a very
efficient and C-ish drawing method that was created with gtk3 in mind.

its not exactly atypical to find that what you want doesn't exist and you
have to blend bits and piece.
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] C/gtk3/cairo meter widget

2013-02-10 Thread Patrick Shirkey

On Mon, February 11, 2013 3:21 pm, Paul Davis wrote:
> On Sun, Feb 10, 2013 at 11:16 PM, Patrick Shirkey <
> pshir...@boosthardware.com> wrote:
>
>>
>> On Mon, February 11, 2013 9:47 am, Tristan Matthews wrote:
>> > 2013/2/10 Patrick Shirkey 
>>
>> > Therè's this one:
>> >
>> https://github.com/sat-metalab/scenic/blob/master/src/vumeter/vumeter.cpp
>> > https://github.com/sat-metalab/scenic/blob/master/src/include/vumeter.h
>> >
>> > It has only a few c++isms and could easily be purely in C.
>> >
>>
>> Thanks. It does look useful. Seems to be written for gtk2 though. Have
>> you
>> compiled it with gtk3?
>>
>
> at the very least, it would need a draw() method rather than an expose()
> method.
>
> plus, if i read it correctly it also redraws its entire self (subject to
> cairo clipping) on every expose.
>
> contrast with the the fastmeter in ardour3's libs/gtkmm2ext which draws
> only the changed pixels per expose.
>

I would prefer to use that but it's in pure C++ as well as GTK2 so I have
to convert it to c and gtk3 :-(





--
Patrick Shirkey
Boost Hardware Ltd
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] C/gtk3/cairo meter widget

2013-02-10 Thread Paul Davis
On Sun, Feb 10, 2013 at 11:16 PM, Patrick Shirkey <
pshir...@boosthardware.com> wrote:

>
> On Mon, February 11, 2013 9:47 am, Tristan Matthews wrote:
> > 2013/2/10 Patrick Shirkey 
>
> > Therè's this one:
> >
> https://github.com/sat-metalab/scenic/blob/master/src/vumeter/vumeter.cpp
> > https://github.com/sat-metalab/scenic/blob/master/src/include/vumeter.h
> >
> > It has only a few c++isms and could easily be purely in C.
> >
>
> Thanks. It does look useful. Seems to be written for gtk2 though. Have you
> compiled it with gtk3?
>

at the very least, it would need a draw() method rather than an expose()
method.

plus, if i read it correctly it also redraws its entire self (subject to
cairo clipping) on every expose.

contrast with the the fastmeter in ardour3's libs/gtkmm2ext which draws
only the changed pixels per expose.
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] C/gtk3/cairo meter widget

2013-02-10 Thread Patrick Shirkey

On Mon, February 11, 2013 9:47 am, Tristan Matthews wrote:
> 2013/2/10 Patrick Shirkey 
>
>> Hi,
>>
>> Before I spend any time to rewrite the gtkmeter.c/h  widget for JAMin to
>> gtk3/cairo does anyone have one already finished?
>>
>> Needs to be in C.
>>
>
> Therè's this one:
> https://github.com/sat-metalab/scenic/blob/master/src/vumeter/vumeter.cpp
> https://github.com/sat-metalab/scenic/blob/master/src/include/vumeter.h
>
> It has only a few c++isms and could easily be purely in C.
>

Thanks. It does look useful. Seems to be written for gtk2 though. Have you
compiled it with gtk3?



--
Patrick Shirkey
Boost Hardware Ltd
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] C/gtk3/cairo meter widget

2013-02-10 Thread Tristan Matthews
2013/2/10 Patrick Shirkey 

> Hi,
>
> Before I spend any time to rewrite the gtkmeter.c/h  widget for JAMin to
> gtk3/cairo does anyone have one already finished?
>
> Needs to be in C.
>

Therè's this one:
https://github.com/sat-metalab/scenic/blob/master/src/vumeter/vumeter.cpp
https://github.com/sat-metalab/scenic/blob/master/src/include/vumeter.h

It has only a few c++isms and could easily be purely in C.

Best,
Tristan


>
>
> --
> Patrick Shirkey
> Boost Hardware Ltd
> ___
> Linux-audio-dev mailing list
> Linux-audio-dev@lists.linuxaudio.org
> http://lists.linuxaudio.org/listinfo/linux-audio-dev
>



-- 
Tristan Matthews
web: http://tristanswork.blogspot.com
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


[LAD] C/gtk3/cairo meter widget

2013-02-10 Thread Patrick Shirkey
Hi,

Before I spend any time to rewrite the gtkmeter.c/h  widget for JAMin to
gtk3/cairo does anyone have one already finished?

Needs to be in C.



--
Patrick Shirkey
Boost Hardware Ltd
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev