Changeset b2ea16b


Ignore:
Timestamp:
Jun 1, 2010, 8:45:29 PM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
135d24b
Parents:
5b80b87
git-author:
David Benjamin <davidben@mit.edu> (06/01/10 20:43:44)
git-committer:
David Benjamin <davidben@mit.edu> (06/01/10 20:45:29)
Message:
Add a view-changed signal to the notifier and export

This really wants to live on owl_view and owl_mainwin, but whatever.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • globalnotifier.h

    rf3a9d4d rb2ea16b  
    3939OwlGlobalNotifier* owl_global_notifier_new(owl_global *g);
    4040
     41void owl_global_notifier_emit_view_changed(OwlGlobalNotifier *gn);
     42
    4143G_END_DECLS
    4244
  • globalnotifiergen.pl

    r5b80b87 rb2ea16b  
    5050};
    5151
     52/* signals */
     53enum {
     54  VIEW_CHANGED,
     55  LAST_SIGNAL
     56};
     57
     58static guint notifier_signals[LAST_SIGNAL] = { 0 };
     59
    5260G_DEFINE_TYPE(OwlGlobalNotifier, owl_global_notifier, G_TYPE_OBJECT)
    5361
     
    141149  gobject_class->get_property = owl_global_notifier_get_property;
    142150  gobject_class->set_property = owl_global_notifier_set_property;
     151
     152  /* Create signals */
     153
     154  notifier_signals[VIEW_CHANGED] =
     155    g_signal_new("view-changed",
     156                 G_TYPE_FROM_CLASS(gobject_class),
     157                 G_SIGNAL_RUN_FIRST,
     158                 0,
     159                 NULL, NULL,
     160                 g_cclosure_marshal_VOID__VOID,
     161                 G_TYPE_NONE,
     162                 0,
     163                 NULL);
    143164
    144165  /* Register properties */
     
    206227  return gn;
    207228}
    208 EOT
     229
     230void owl_global_notifier_emit_view_changed(OwlGlobalNotifier *gn)
     231{
     232  g_signal_emit(gn, notifier_signals[VIEW_CHANGED], 0);
     233}
     234EOT
Note: See TracChangeset for help on using the changeset viewer.