Results 1 to 3 of 3

Thread: GNOME broadcasts/events API?

  1. #1
    Join Date
    Dec 2008
    Beans
    279
    Distro
    Ubuntu 9.10 Karmic Koala

    GNOME broadcasts/events API?

    I just started using suspend on my laptop instead of hibernating (man its faster) but I'm worried about how much power it uses while suspended. I wanna write myself a program that will listen for the suspend command, and record the battery percentage and the current time. Then when the laptop is brought out of suspend, it will record the current time and battery percentage again, then tell me how much battery I lost and how long it was suspended.

    However, I'm having trouble finding interfaces to listen on to get these broadcasts, I've tried the GNOME documentation but it all seems to be about GTK interface design. How do I use GNOME events in my programs?
    Using Linux instead of OSX is like driving a manual car instead of an automatic. It requires more knowledge of your hardware, but gives you more control and performance when used well.

  2. #2

    Re: GNOME broadcasts/events API?

    Take a look at the dbus interface and libnotify.
    NOW running Lucid 64-Bit on an Atari™ 2600 gaming console with an add-on, 64 bit address bus made of tinfoil and an Intel GPU hammered into the DMA slot and kept there with an old piece of chewing gum.

  3. #3
    Join Date
    Dec 2008
    Beans
    279
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: GNOME broadcasts/events API?

    Cool, thanks looks like thats exactly what I was looking for.

    What bus would I want to listen on for battery info and time? I'm trying to find a good bus reference but haven't found one yet.
    Last edited by v1nsai; August 15th, 2010 at 09:15 PM.
    Using Linux instead of OSX is like driving a manual car instead of an automatic. It requires more knowledge of your hardware, but gives you more control and performance when used well.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •