[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI and a few questions...

From: Yen-Ju Chen
Subject: Re: FYI and a few questions...
Date: Fri, 27 Jul 2007 08:46:36 -0700

On 7/27/07, Stefan Bidigaray <address@hidden> wrote:
> So I finally broke down and subscribed to gnustep-dev!  I recently
> (Wednesday) started working on an implementation of Apple's ScreenSaver
> framework so that I can get more acquainted with GNUstep programming.  I
> figured this framework would be fairly easy to do, which it is, for most
> part.  I decided to split it in 3 parts, which I think is what I'd have to
> do anyway: the framework, a screen saver tool (which I called gssaver), and
> a preference module to configure it.
> So far I've managed to complete implementing the ScreenSaverView class and
> the SS* functions, but have no idea how to work the ScreenSaverDefaults
> class.  I most definitely will need some help implementing
> ScreenSaverDefaults, but I'm not too worried about it now since the default
> screen saver is a blank screen and doesn't need any configuration.
> I still haven't done anything in the preference module front.  Since all of
> the programming I've done has been at work and my everyday computer I
> haven't had access to a GNUstep installation, and haven't been able to use
> Gorm to create the interface.  I figured I would build the module by hand,
> but gave up on that idea since I thought I could learn more using Gorm.  For
> now, I've kind of put off creating the preference module till I'm done with
> the tool.
> The tool, gssaver, is turning out to be a little more complicated than I
> initially thought.  What I figured I'd do with it is make it an
> NSApplication but build it as a tool (not really sure if this would work).
> So I've implemented a simple delegate class for now which: creates a black
> window the size of the screen; loads the defaults; finds the screen saver;
> adds a ScreenSaverView subview; orders it to front; and calls the
> ScreenSaverView's -startAnimation method (in that order).
> My questions:
> 1) I still haven't figured out how I'm going to count how many minutes it's
> been since the last even, and much less how to even find out if events have
> happened.  Does anyone have any ideas on how to do this?

  GNUstep window only get event when it has the focus.
  There is a small tool in Etoile called 'Idle',
  which uses Xwindow extension to check
  how long users have being idling and post notification, I guess.
  It may be useful for you.


> 2) I also have no idea how to figure if, once the screen saver is on, how to
> stop if when something happens (mouse move, key stroke, mouse click).  I've
> looked at the docs for NSView and there doesn't seem to be any methods that
> would make this easy.  What can I do here?
> 3) Once the preference module is completed and working, I'll need to have
> gssaver check the defaults after the preferences change, is there anyway I
> can send it a message asking it to check the defaults fromt the preference
> module?
> 4) Lastly, I'll need a lot of help creating ScreenSaverDefaults, but only
> later.  I've check NSUserDefaults' code and I'm more confused now than I was
> when I started out.  I figured for this, the best thing would be to create a
> new file (ScreenSaverDefaults) under the Defaults directory.
> NSUserDefaults, however, seems to be very picky about there being a process
> running and writing to that process.
> After it's all said and done I'd like to add this to GNUstep as I think it
> would make more sense being distributed by it (much like SystemPreferences
> and it's NSPreferencePane implementation).  I already have a copyright
> assignment, so it shouldn't be a problem.
> Any comments and/or suggestions would be appreciated.
> Stefan
> _______________________________________________
> Gnustep-dev mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]