Hi Daniel,
thanks for writing this introductionary documentation!

Do you see another way (based on HTML/CSS) to send text to the notification 
which preserves a layout?
At least the commandline tool seems to escape embedded HTML and blanks are 
not rendered.
As an example think of the output "cal" piped to growlnotify.

Where can I find the Growl source code?

Thanks
Thomas




On Sunday, March 31, 2013 4:12:19 PM UTC+2, Daniel Siemer wrote:
>
> So, when we rewrote the plugin system in 2.0, I created a project 
> template you can install to make a plugin xcode project.  However, 
> said template never had its display side finished, only the action 
> side was.  The display plugin should still create the utter basics, 
> however it will not create any of the classes needed except the 
> preference pane.  Cocoa displays aren't terribly common from third 
> parties, so it just wasn't a priority (and Displays weren't as fully 
> rewritten and abstracted as they should have been, which makes 
> implementing them annoying still).  As Chris said, you can look at the 
> main code base for plenty of examples. 
>
> Basics of our plugin system.  Plugin bundles get installed to our 
> container in ~/Library/Containers/com.Growl.GrowlHelperApp/Library/ 
> Application Support/Growl/Plugin, and simply double clicking the 
> bundle will have us install it in the right place.  Growl supports two 
> different bundle types, growlstyle (CSS/HTML) and growlview (Cocoa/Obj- 
> C).  In Growl 2.0, cocoa plugins need to link against our 
> GrowlPlugins.framework, which has all the base classes, and a lot of 
> different code you might need.  You should *not* bundle this framework 
> with your plugin, Growl bundles this and links it, and we have a 
> Info.plist key that you need to use to declare the version of the 
> framework you linked against so we can disable your plugin if we break 
> something in a future version. 
>
> Display plugins main class doesn't have much in it, and inherits from 
> GrowlDisplayPlugin, there are a couple things it needs to do.  First 
> is to set the windowControllerClass is the class where more of the 
> magic really happens.  Next is to set the prefsDomain, and finally is 
> to optionally provide a preferencePane. 
>
> GrowlDisplayWindowController subclass is where you set up the window, 
> and again, this is where looking at the plugins in Growl itself is 
> probably a good idea, as a lot happens in the init method. 
> GrowlNotificationView subclass is where the big stuff really happens, 
> a bunch of layout related code is there. 
>
> On Mar 31, 7:06 am, Chris Forsythe <[email protected]> wrote: 
> > Let's keep the conversation here. You should have plenty of examples by 
> simply downloading the Growl source through mercurial. :) 
> > 
> > -- 
> > Chris Forsythe 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > On Sunday, March 31, 2013 at 6:00 AM, Thomas Schlosser wrote: 
> > > Hi Chris, 
> > > sorry, I don't want to crosspost too much - there is a conversation in 
> Twitter (@GrowlMac) as well. 
> > 
> > > I downloaded SDK 2.0.1 and found the Plugin Dev folder. 
> > > But after reading the readme's twice (not yet trying what happens in 
> Xcode) I feel very uncomfortable with this. I don't understand the basic 
> structure yet (basically I would expect some main method which the plugin 
> has to implement to receive calls from Growl to display a notification; 
> delegation pattern), what has to be produced in the Xcode product finally 
> and how it is "linked" to Growl (installation). 
> > > I have never seen this template technique before (but maybe it shows 
> up like the Apple preinstalled templates - which would be great). 
> > 
> > > For my special way to approach similar things it would be phantastic 
> to have a minimal (!) Xcode project which ideally works out of the box. 
> Maybe the preferences part isn't even needed for this (optional?). 
> > 
> > > And/or a walk through like for Webkit based style "plugin". 
> > 
> > > Thanks 
> > > Thomas 
> > 
> > > On Sunday, March 31, 2013 7:32:19 AM UTC+2, Christopher Forsythe 
> wrote: 
> > > > We have a brand new bit of work in Growl 2 and the accompanying SDK 
> that should be a good start. Look in the 2.0.1 SDK at the Plugin 
> Development directory. Let us know if you have any questions. 
> > 
> > > > I don't know how you would address this with a webkit display 
> either. 
> > 
> > > > -- 
> > > > Chris Forsythe 
> > > > @The_Tick (http://twitter.com/The_Tick) 
> > 
> > > > On Saturday, March 30, 2013 at 6:47 AM, Thomas Schlosser wrote: 
> > 
> > > > > On this page (http://growl.info/documentation/webkit.php) I found 
> out that besides the CSS-based display styles there must be another one 
> based on Objective.C. 
> > 
> > > > > I couldn't find any examples, how-tos or documemtation about this. 
> > > > > I have seen some examples integrating Growl via the API / 
> framework into existing Cocoa applications, but I just want to have better 
> control on the output. 
> > 
> > > > > Any places you could me point to? 
> > 
> > > > > FYI: What I want to do? 
> > > > > Basically I want at least to have control about formatting (at 
> least line breaks and spacing) in the text part of the notification. 
> > > > > Example from terminal: cal | growlnotifier -t Calendar 
> > > > > All the blanks are not displayed as HTML does not render them. But 
> I can't just replace them with &nbsp; because these are escaped and 
> displayed as text. 
> > > > > Any hints on this are also very welcome! 
> > 
> > > > > Thanks 
> > > > > Thomas 
> > 
> > > > > -- 
> > > > > You received this message because you are subscribed to the Google 
> Groups "Growl Discuss" group. 
> > > > > To unsubscribe from this group and stop receiving emails from it, 
> send an email to [email protected]. 
> > > > > To post to this group, send email to [email protected]. 
> > > > > Visit this group athttp://
> groups.google.com/group/growldiscuss?hl=en. 
> > > > > For more options, visithttps://groups.google.com/groups/opt_out. 
> > 
> > > -- 
> > > You received this message because you are subscribed to the Google 
> Groups "Growl Discuss" group. 
> > > To unsubscribe from this group and stop receiving emails from it, send 
> an email to [email protected] <javascript:>. 
> > > To post to this group, send email to 
> > > [email protected]<javascript:>. 
>
> > > Visit this group athttp://groups.google.com/group/growldiscuss?hl=en. 
> > > For more options, visithttps://groups.google.com/groups/opt_out. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Growl Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/growldiscuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to