Back to index

libindicate  12.10.0
Functions | Variables
show-hide-server.c File Reference
#include <glib.h>
#include "libindicate/server.h"

Go to the source code of this file.

Functions

static gboolean timeout_cb (gpointer data)
int main (int argc, char **argv)

Variables

gboolean hidden = TRUE

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 30 of file show-hide-server.c.

{
       g_type_init();

       IndicateServer * server = indicate_server_ref_default();
       indicate_server_set_type(server, "message.im");
       indicate_server_set_desktop_file(server, "/usr/share/applications/empathy.desktop");
       g_timeout_add_seconds(1, timeout_cb, server);

       g_main_loop_run(g_main_loop_new(NULL, FALSE));

       return 0;
}

Here is the call graph for this function:

static gboolean timeout_cb ( gpointer  data) [static]

Definition at line 9 of file show-hide-server.c.

{
    IndicateServer * server = INDICATE_SERVER(data);

       if (hidden) {
        g_debug("showing... ");
        indicate_server_show(server);
        g_debug("ok\n");
        hidden = FALSE;
       } else {
        g_debug("hiding... ");
        indicate_server_hide(server);
        g_debug("ok\n");
        hidden = TRUE;
       }

       return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

gboolean hidden = TRUE

Definition at line 6 of file show-hide-server.c.