~dbusmenu-team/libdbusmenu/trunk.16.10

« back to all changes in this revision

Viewing changes to tests/glib-server-nomenu.c

  • Committer: Ted Gould
  • Date: 2009-05-12 16:23:10 UTC
  • mfrom: (1.1.85 work)
  • Revision ID: ted@canonical.com-20090512162310-wz9hm3sks368ry8j
Merging in my working branch that brings in basic object functionality passing across DBus.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
A test for libdbusmenu to ensure its quality.
 
3
 
 
4
Copyright 2009 Canonical Ltd.
 
5
 
 
6
Authors:
 
7
    Ted Gould <ted@canonical.com>
 
8
 
 
9
This program is free software: you can redistribute it and/or modify it 
 
10
under the terms of the GNU General Public License version 3, as published 
 
11
by the Free Software Foundation.
 
12
 
 
13
This program is distributed in the hope that it will be useful, but 
 
14
WITHOUT ANY WARRANTY; without even the implied warranties of 
 
15
MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
 
16
PURPOSE.  See the GNU General Public License for more details.
 
17
 
 
18
You should have received a copy of the GNU General Public License along 
 
19
with this program.  If not, see <http://www.gnu.org/licenses/>.
 
20
*/
 
21
 
 
22
#include <glib.h>
 
23
 
 
24
#include <libdbusmenu-glib/server.h>
 
25
#include <libdbusmenu-glib/menuitem.h>
 
26
 
 
27
int
 
28
main (int argc, char ** argv)
 
29
{
 
30
        g_type_init();
 
31
 
 
32
        DbusmenuServer * server = dbusmenu_server_new("/org/test");
 
33
        DbusmenuMenuitem * menuitem = dbusmenu_menuitem_new();
 
34
        dbusmenu_server_set_root(server, menuitem);
 
35
 
 
36
        g_main_loop_run(g_main_loop_new(NULL, FALSE));
 
37
 
 
38
        return 0;
 
39
}