~dbusmenu-team/libdbusmenu/trunk.16.04

« back to all changes in this revision

Viewing changes to libdbusmenu-glib/menuitem.c

  • Committer: Ted Gould
  • Date: 2010-08-12 16:15:15 UTC
  • Revision ID: ted@gould.cx-20100812161515-fl5q1ns4x5iwfa37
Tags: 0.3.10
0.3.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
        CHILD_REMOVED,
71
71
        CHILD_MOVED,
72
72
        REALIZED,
73
 
        SHOW_TO_USER,
74
73
        LAST_SIGNAL
75
74
};
76
75
 
212
211
                                                   NULL, NULL,
213
212
                                                   _dbusmenu_menuitem_marshal_VOID__VOID,
214
213
                                                   G_TYPE_NONE, 0, G_TYPE_NONE);
215
 
        /**
216
 
                DbusmenuMenuitem::show-to-user:
217
 
                @arg0: The #DbusmenuMenuitem which should be shown.
218
 
                @arg1: Timestamp the event happened at
219
 
 
220
 
                Signaled when the application would like the visualization
221
 
                of this menu item shown to the user.  This usually requires
222
 
                going over the bus to get it done.
223
 
        */
224
 
        signals[SHOW_TO_USER] =      g_signal_new(DBUSMENU_MENUITEM_SIGNAL_SHOW_TO_USER,
225
 
                                                   G_TYPE_FROM_CLASS(klass),
226
 
                                                   G_SIGNAL_RUN_LAST,
227
 
                                                   G_STRUCT_OFFSET(DbusmenuMenuitemClass, show_to_user),
228
 
                                                   NULL, NULL,
229
 
                                                   g_cclosure_marshal_VOID__UINT,
230
 
                                                   G_TYPE_NONE, 1, G_TYPE_UINT, G_TYPE_NONE);
231
214
 
232
215
        g_object_class_install_property (object_class, PROP_ID,
233
216
                                         g_param_spec_int(PROP_ID_S, "ID for the menu item",
1366
1349
 
1367
1350
        return;
1368
1351
}
1369
 
 
1370
 
/**
1371
 
        dbusmenu_menuitem_show_to_user:
1372
 
        @mi: #DbusmenuMenuitem to show
1373
 
        @timestamp: The time that the user requested it to be shown
1374
 
 
1375
 
        Signals that this menu item should be shown to the user.  If this is
1376
 
        server side the server will then take it and send it over the
1377
 
        bus.
1378
 
*/
1379
 
void
1380
 
dbusmenu_menuitem_show_to_user (DbusmenuMenuitem * mi, guint timestamp)
1381
 
{
1382
 
        g_return_if_fail(DBUSMENU_IS_MENUITEM(mi));
1383
 
 
1384
 
        g_signal_emit(G_OBJECT(mi), signals[SHOW_TO_USER], 0, timestamp, TRUE);
1385
 
 
1386
 
        return;
1387
 
}