How to display a notification with image? - Libnotify


 
Thread Tools Search this Thread
Top Forums Programming How to display a notification with image? - Libnotify
# 1  
Old 08-25-2010
Question How to display a notification with image? - Libnotify

Hi all, this is the code:
Code:
#include <libnotify/notify.h>
#include <stdio.h>
#include <unistd.h>

int main()
{
    NotifyNotification *n;

    notify_init("Basics");

    n = notify_notification_new ("Summary",
                                 "\nThis is the message that we want to display",
                                  NULL, NULL);
    notify_notification_set_timeout (n, 5000); // 5 seconds

    if (!notify_notification_show (n, NULL))
    {
        return 1;
    }

    g_object_unref(G_OBJECT(n));

    return 0;
}

It displays a message without any problem, but I want to add a specific image to it as many apps do so...
Is this possible with libnotify? And if it is, how do I do it? SmilieSmilie
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Solaris

Copy image on Server-1 and Restores image on Server-2

Hi, I have done Copy image and Restores back on Windows. I have two solaris servers, one contains Solaris OS and Applications on Server-1. Want i required is want to copy image of Server-1 and restores the copied image on Server-2. First of all, is it possibile in Solaris. If it is then... (4 Replies)
Discussion started by: sarshads
4 Replies

2. Shell Programming and Scripting

matching image files to create one image

Hi, I have two sets of image files. Both sets have names A to Z but set 1 ends with .cdt.png and set 2 ends with .matrix.png. I want set 1 to match with set 2 if the names match (i.e. A.cdt.png will match with A.matrix.png) and with the convert image tool (program for images), it will merge the... (6 Replies)
Discussion started by: kylle345
6 Replies

3. Programming

libnotify (g_signal_connect() 3rd argument help) c++

Hello, this is my code: #include <glib.h> #include <unistd.h> #include <libnotify/notify.h> void push_notification (gchar* title, gchar* body, gchar* icon) { NotifyNotification* notification; gboolean success; ... (0 Replies)
Discussion started by: hakermania
0 Replies

4. Web Development

Problem with image display stored outside webserver in Unix?

Hi All, I have an image stored in my solaris server path /usr/Apps/TEMP directory. I have created this image at runtime. I have my web application dployed in my webserver path /usr/Apps/tomcat/jakarta-tomcat-5.5.7/webapps/DispReports From a jsp file available under my DispReports folder, I... (1 Reply)
Discussion started by: nsurendiran
1 Replies

5. UNIX for Advanced & Expert Users

if up notification

Hello experts, I have a requirement of notifying my application everytime a network interface is brought up. My application supports Various Unix flavours e.g. RHEL, SLES, AIX, Solaris and Mac OS. I know that SLES supports /etc/sysconfig/network/if-up.d hook scripts that run once an interface is... (2 Replies)
Discussion started by: GajendraSharma
2 Replies

6. UNIX for Advanced & Expert Users

Create an Ignite image on tape from Online IgniteUX image

Hi, (HP-UX 11.11) I need to create a tape image of an igniteUX image created on our igniteUX server. That is to say. I have a "Online" image of the igniteUX of the targeted system but I now need to copy it to a useable TAPE (igniteUX) image so i can build an other server from it that is not... (3 Replies)
Discussion started by: Andrek
3 Replies
Login or Register to Ask a Question
ppmtosixel(1)						      General Commands Manual						     ppmtosixel(1)

NAME
ppmtosixel - convert a portable pixmap into DEC sixel format SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC LJ250 color inkjet printer. If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file. OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com- pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni- tude larger than a compressed file and prints much slower. -margin If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci- fied, a 1.5 inch left margin will offset the image. PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?. BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation. SEE ALSO
ppm(5) AUTHOR
Copyright (C) 1991 by Rick Vinci. 26 April 1991 ppmtosixel(1)