1 #include <string.h> /* for strcmp() */
2 #include <gdk/gdkx.h> /* for gdk_x11_window_set_user_time() */
5 #include "tilda-controller.h"
6 #include "tilda-window.h"
7 #include "tilda-window-dbus-glue.h"
8 #include "tomboykeybinder.h"
11 * Find the TildaTerminal corresponding to the currently selected
12 * tab in self->notebook. This could go away if TildaTerminal were
13 * a proper subclass of GtkWidget.
15 static TildaTerminal *
16 tilda_window_find_current_terminal (TildaWindow *self)
19 debug_assert (TILDA_IS_WINDOW(self));
23 gint current_page = gtk_notebook_get_current_page (GTK_NOTEBOOK(self->notebook));
24 GtkWidget *box = gtk_notebook_get_nth_page (GTK_NOTEBOOK(self->notebook), current_page);
26 for (i=0; i<self->terms->len; ++i)
28 ret = g_ptr_array_index (self->terms, i);
34 debug_printf ("ERROR: unable to find current terminal!\n");
39 tilda_window_find_next_free_terminal_number (TildaWindow *self)
42 debug_assert (TILDA_IS_WINDOW(self));
47 for (i=0; i<INT_MAX; ++i)
51 for (j=0; j<self->terms->len; ++j)
53 TildaTerminal *tt = g_ptr_array_index (self->terms, j);
70 * Clean up and remove self completely from the program
72 * Should only be used by DBus...
75 tilda_window_close (TildaWindow *self)
78 debug_assert (TILDA_IS_WINDOW(self));
80 tilda_controller_remove_window (TILDA_CONTROLLER(self->controller), self->number);
86 tilda_window_add_terminal (TildaWindow *self)
89 debug_assert (TILDA_IS_WINDOW(self));
94 number = tilda_window_find_next_free_terminal_number (self);
95 tt = g_object_new (TILDA_TYPE_TERMINAL,
97 "parent-window", self,
99 g_ptr_array_add (self->terms, tt);
101 GtkWidget *label = gtk_label_new ("Tilda");
102 gint index = gtk_notebook_prepend_page (GTK_NOTEBOOK(self->notebook), tt->hbox, label);
103 gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK(self->notebook), tt->hbox, TRUE, TRUE, GTK_PACK_END);
104 gtk_notebook_set_current_page (GTK_NOTEBOOK(self->notebook), index);
106 if (gtk_notebook_get_n_pages (GTK_NOTEBOOK(self->notebook)) > 1)
107 gtk_notebook_set_show_tabs (GTK_NOTEBOOK(self->notebook), TRUE);
109 /* Focus the VTE Terminal */
110 gtk_widget_grab_focus (tt->vte_term);
116 * Remove the TildaTerminal with the given number from the given
119 * Return: TRUE on success, FALSE otherwise.
122 tilda_window_remove_terminal (TildaWindow *self, gint terminal_number)
125 debug_assert (TILDA_IS_WINDOW(self));
126 debug_assert (terminal_number >= 0);
130 for (i=0; i<self->terms->len; ++i)
132 TildaTerminal *tt = g_ptr_array_index (self->terms, i);
134 if (tt->number == terminal_number)
136 gint notebook_index = gtk_notebook_page_num (GTK_NOTEBOOK(self->notebook), tt->hbox);
138 /* Make sure the index was valid */
139 if (notebook_index == -1)
141 debug_printf ("ERROR: Bad Notebook Tab\n");
145 /* Actually remove the terminal */
146 gtk_notebook_remove_page (GTK_NOTEBOOK (self->notebook), notebook_index);
148 /* We should hide the tabs if there is only one tab left */
149 if (gtk_notebook_get_n_pages (GTK_NOTEBOOK (self->notebook)) == 1)
150 gtk_notebook_set_show_tabs (GTK_NOTEBOOK (self->notebook), FALSE);
152 /* Remove the term from our lists, then free it */
153 g_ptr_array_remove_fast (self->terms, tt);
154 g_object_unref (G_OBJECT(tt));
156 /* With no pages left, it's time to remove this window */
157 if (gtk_notebook_get_n_pages (GTK_NOTEBOOK (self->notebook)) < 1)
159 debug_printf ("no terminals left, closing window %d\n", self->number);
160 tilda_controller_remove_window (TILDA_CONTROLLER(self->controller), self->number);
163 /* Leave the loop, we're done */
172 * This sets up the given TildaWindow for the capability of real
173 * transparency, if the X server is capable of it. */
175 tilda_window_setup_real_transparency (TildaWindow *self)
178 debug_assert (TILDA_IS_WINDOW(self));
181 GdkColormap *colormap;
183 screen = gtk_widget_get_screen (GTK_WIDGET(self->window));
184 colormap = gdk_screen_get_rgba_colormap (screen);
186 /* If possible, set the RGBA colormap so VTE can use real alpha
187 * channels for transparency. */
188 if (colormap != NULL && gdk_screen_is_composited (screen))
190 gtk_widget_set_colormap (GTK_WIDGET(self->window), colormap);
191 self->have_real_transparency = TRUE;
195 self->have_real_transparency = FALSE;
198 /* Center the given TildaWindow in the horizontal axis */
200 tilda_window_center_horizontally (TildaWindow *self)
203 debug_assert (TILDA_IS_WINDOW(self));
205 const gint screen_center = gdk_screen_width() / 2;
206 const gint tilda_center = self->width / 2;
207 const gint center_coord = screen_center - tilda_center;
209 g_object_set (G_OBJECT(self), "x-position", center_coord, NULL);
212 /* Center the given TildaWindow in the vertical axis */
214 tilda_window_center_vertically (TildaWindow *self)
217 debug_assert (TILDA_IS_WINDOW(self));
219 const gint screen_center = gdk_screen_height() / 2;
220 const gint tilda_center = self->height / 2;
221 const gint center_coord = screen_center - tilda_center;
223 g_object_set (G_OBJECT(self), "y-position", center_coord, NULL);
227 tilda_window_keybinding_cb (const gchar *keystr, gpointer data)
230 debug_assert (TILDA_IS_WINDOW(data));
232 TildaWindow *self = TILDA_WINDOW(data);
235 /* This call sets the X11 window property _NET_WM_USER_TIME, which GTK+ normally
236 * sets for us. However, because this callback is activated via a global keybinding,
237 * we see the event before GDK / GTK+ does. Therefore, to get the focus, we must
238 * set the property ourselves. */
239 gdk_x11_window_set_user_time (GTK_WIDGET(self->window)->window,
240 tomboy_keybinder_get_current_event_time());
244 case WINDOW_UP: /* Pull the window up */
246 /* Bugfix: having this here keeps the tilda window from being
247 * hidden if you turn off "stick", pull it down on workspace 1,
248 * switch to workspace 2, then pull it up and back down. Without
249 * this, something in metacity (at least) hides the window. Stupid. */
250 gtk_window_deiconify (GTK_WINDOW(self->window));
252 /* Re-set the window properties that do not linger after hiding the
253 * window. I know this looks stupid, but it keeps all of the state-
254 * changing code in the place it belongs: the property-setting code. */
255 g_object_set (G_OBJECT(self),
256 "keep-above", self->keep_above,
257 "stick", self->stick,
259 gtk_widget_show (GTK_WIDGET(self->window));
261 /* Focusing the term here works perfectly, near as I can tell */
262 tt = tilda_window_find_current_terminal (self);
263 gtk_widget_grab_focus (GTK_WIDGET(tt->vte_term));
265 self->state = WINDOW_DOWN;
268 case WINDOW_DOWN: /* Pull the window up */
270 gtk_widget_hide (GTK_WIDGET(self->window));
272 self->state = WINDOW_UP;
276 debug_printf ("ERROR: Window is in a bad state!\n");
278 /* Pretend we're down, for good measure.... */
279 self->state = WINDOW_DOWN;
285 * Attempt to bind the new_key to show this window.
287 * Return: TRUE if successful, FALSE otherwise.
290 tilda_window_try_to_bind_key (TildaWindow *self, const gchar *new_key)
293 debug_assert (TILDA_IS_WINDOW(self));
295 gboolean ret = FALSE;
297 /* Make sure the new key is not null in any way */
298 if (new_key == NULL || strcmp("", new_key) == 0)
301 /* Unbind if we were set */
303 tomboy_keybinder_unbind (self->key, tilda_window_keybinding_cb);
305 ret = tomboy_keybinder_bind (new_key, tilda_window_keybinding_cb, self);
307 /* If it was successful, update the self->key variable and be done with it */
311 self->key = g_strdup (new_key);
315 g_printerr (_("Bind key '%s' failed. Reverting to original keybinding\n"), self->key);
317 /* Not successful, so rebind the old key, and return FALSE */
318 if (self->key != NULL && strcmp("",self->key) != 0)
320 ret = tomboy_keybinder_bind (self->key, tilda_window_keybinding_cb, self);
322 /* Check that it went ok */
324 g_printerr (_("Unable to re-bind original key '%s'. Oh shit...\n"), self->key);
327 g_printerr (_("No original key to revert to!\n"));
333 tilda_window_dbus_register_object (TildaWindow *self)
336 debug_assert (TILDA_IS_WINDOW(self));
340 // Register this object with DBus
341 object_path = g_strdup_printf ("/net/sourceforge/Tilda/Window%d", self->number);
342 dbus_g_connection_register_g_object (dbus_connection, object_path, G_OBJECT(self));
343 g_free (object_path);
346 /*******************************************************************************
347 * ALL GOBJECT STUFF BELOW PLEASE
348 ******************************************************************************/
350 static GObjectClass *parent_class = NULL;
352 enum tilda_window_properties {
353 TILDA_WINDOW_NUMBER = 1,
354 TILDA_WINDOW_CONTROLLER,
360 TILDA_WINDOW_X_POSITION,
361 TILDA_WINDOW_Y_POSITION,
363 TILDA_WINDOW_TAB_POSITION,
364 TILDA_WINDOW_ANIMATION_ORIENTATION,
365 TILDA_WINDOW_ANIMATION_DELAY,
367 TILDA_WINDOW_KEEP_ABOVE,
368 TILDA_WINDOW_SKIP_TASKBAR_HINT,
370 TILDA_WINDOW_HIDDEN_AT_START,
371 TILDA_WINDOW_CENTERED_HORIZONTALLY,
372 TILDA_WINDOW_CENTERED_VERTICALLY,
374 TILDA_WINDOW_HAVE_REAL_TRANSPARENCY,
378 tilda_window_instance_init (GTypeInstance *instance,
383 TildaWindow *self = (TildaWindow *) instance;
384 self->dispose_has_run = FALSE;
386 /* Initialize all properties */
387 self->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
388 self->notebook = gtk_notebook_new ();
389 self->terms = g_ptr_array_new ();
391 /* Somewhat of a "poison" value, incase we don't set this */
392 self->number = 0xdeadbeef;
393 self->controller = NULL;
395 self->state = WINDOW_UP;
399 tilda_window_set_property (GObject *object,
404 TildaWindow *self = (TildaWindow *) object;
406 switch (property_id) {
408 case TILDA_WINDOW_NUMBER:
409 self->number = g_value_get_int (value);
410 debug_printf ("window number: %d\n", self->number);
413 case TILDA_WINDOW_CONTROLLER:
414 self->controller = g_value_get_pointer (value);
415 debug_printf ("window controller: 0x%x\n", self->controller);
418 case TILDA_WINDOW_KEY:
419 tilda_window_try_to_bind_key (self, g_value_get_string (value));
420 debug_printf ("window key %s\n", self->key);
423 case TILDA_WINDOW_HEIGHT:
424 self->height = g_value_get_int (value);
425 gtk_widget_set_size_request (self->window, self->width, self->height);
426 gtk_window_resize (GTK_WINDOW(self->window), self->width, self->height);
427 debug_printf ("window height: %d\n", self->height);
430 case TILDA_WINDOW_WIDTH:
431 self->width = g_value_get_int (value);
432 gtk_widget_set_size_request (self->window, self->width, self->height);
433 gtk_window_resize (GTK_WINDOW(self->window), self->width, self->height);
434 debug_printf ("window width: %d\n", self->width);
437 case TILDA_WINDOW_X_POSITION:
438 self->x_position = g_value_get_int (value);
439 gtk_window_move (GTK_WINDOW(self->window), self->x_position, self->y_position);
440 debug_printf ("window x position: %d\n", self->x_position);
443 case TILDA_WINDOW_Y_POSITION:
444 self->y_position = g_value_get_int (value);
445 gtk_window_move (GTK_WINDOW(self->window), self->x_position, self->y_position);
446 debug_printf ("window y position: %d\n", self->y_position);
449 case TILDA_WINDOW_TAB_POSITION:
450 self->tab_position = g_value_get_int (value);
451 gtk_notebook_set_tab_pos (GTK_NOTEBOOK(self->notebook), self->tab_position);
452 debug_printf ("window tab position: %d\n", self->tab_position);
455 case TILDA_WINDOW_ANIMATION_ORIENTATION:
456 self->animation_orientation = g_value_get_int (value);
457 debug_printf ("window animation orientation: %d\n", self->animation_orientation);
460 case TILDA_WINDOW_ANIMATION_DELAY:
461 self->animation_delay = g_value_get_int (value);
462 debug_printf ("window animation delay: %d\n", self->animation_delay);
465 case TILDA_WINDOW_KEEP_ABOVE:
466 self->keep_above = g_value_get_boolean (value);
467 gtk_window_set_keep_above (GTK_WINDOW(self->window), self->keep_above);
468 debug_printf ("window keep above: %d\n", self->keep_above);
471 case TILDA_WINDOW_SKIP_TASKBAR_HINT:
472 self->skip_taskbar_hint = g_value_get_boolean (value);
473 gtk_window_set_skip_taskbar_hint (GTK_WINDOW(self->window), self->skip_taskbar_hint);
474 debug_printf ("window skip taskbar hint: %d\n", self->skip_taskbar_hint);
477 case TILDA_WINDOW_STICK:
478 self->stick = g_value_get_boolean (value);
480 /* This is moderately ugly, but GTK+ does it this way... */
481 self->stick ? gtk_window_stick (GTK_WINDOW(self->window))
482 : gtk_window_unstick (GTK_WINDOW(self->window));
483 debug_printf ("window stick: %d\n", self->stick);
486 case TILDA_WINDOW_HIDDEN_AT_START:
487 self->hidden_at_start = g_value_get_boolean (value);
488 debug_printf ("window hidden at start: %d\n", self->hidden_at_start);
491 case TILDA_WINDOW_CENTERED_HORIZONTALLY:
492 self->centered_horizontally = g_value_get_boolean (value);
493 if (self->centered_horizontally)
494 tilda_window_center_horizontally (self);
495 debug_printf ("window centered horizontally: %d\n", self->centered_horizontally);
498 case TILDA_WINDOW_CENTERED_VERTICALLY:
499 self->centered_vertically = g_value_get_boolean (value);
500 if (self->centered_vertically)
501 tilda_window_center_vertically (self);
502 debug_printf ("window centered vertically: %d\n", self->centered_vertically);
505 case TILDA_WINDOW_HAVE_REAL_TRANSPARENCY:
506 self->have_real_transparency = g_value_get_boolean (value);
507 debug_printf ("window have real transp: %d\n", self->have_real_transparency);
511 /* We don't have this property */
512 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
518 tilda_window_get_property (GObject *object,
523 TildaWindow *self = (TildaWindow *) object;
525 switch (property_id) {
527 case TILDA_WINDOW_NUMBER:
528 g_value_set_int (value, self->number);
531 case TILDA_WINDOW_CONTROLLER:
532 g_value_set_pointer (value, self->controller);
535 case TILDA_WINDOW_KEY:
536 g_value_set_string (value, self->key);
539 case TILDA_WINDOW_HEIGHT:
540 g_value_set_int (value, self->height);
543 case TILDA_WINDOW_WIDTH:
544 g_value_set_int (value, self->width);
547 case TILDA_WINDOW_X_POSITION:
548 g_value_set_int (value, self->x_position);
551 case TILDA_WINDOW_Y_POSITION:
552 g_value_set_int (value, self->y_position);
555 case TILDA_WINDOW_TAB_POSITION:
556 g_value_set_int (value, self->tab_position);
559 case TILDA_WINDOW_ANIMATION_ORIENTATION:
560 g_value_set_int (value, self->animation_orientation);
563 case TILDA_WINDOW_ANIMATION_DELAY:
564 g_value_set_int (value, self->animation_delay);
567 case TILDA_WINDOW_KEEP_ABOVE:
568 g_value_set_boolean (value, self->keep_above);
571 case TILDA_WINDOW_SKIP_TASKBAR_HINT:
572 g_value_set_boolean (value, self->skip_taskbar_hint);
575 case TILDA_WINDOW_STICK:
576 g_value_set_boolean (value, self->stick);
579 case TILDA_WINDOW_HIDDEN_AT_START:
580 g_value_set_boolean (value, self->hidden_at_start);
583 case TILDA_WINDOW_CENTERED_HORIZONTALLY:
584 g_value_set_boolean (value, self->centered_horizontally);
587 case TILDA_WINDOW_CENTERED_VERTICALLY:
588 g_value_set_boolean (value, self->centered_vertically);
591 case TILDA_WINDOW_HAVE_REAL_TRANSPARENCY:
592 g_value_set_boolean (value, self->have_real_transparency);
596 /* We don't have this property */
597 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
603 tilda_window_constructor (GType type,
604 guint n_construct_properties,
605 GObjectConstructParam *construct_properties)
612 /* Invoke parent constructor */
613 TildaWindowClass *klass;
614 klass = TILDA_WINDOW_CLASS (g_type_class_peek (TILDA_TYPE_WINDOW));
615 obj = parent_class->constructor (type,
616 n_construct_properties,
617 construct_properties);
619 /* Do other stuff here. The object is ready to go now, and all
620 * ctor properties have been set.
622 self = TILDA_WINDOW(obj);
624 /* Register this object with DBus */
625 tilda_window_dbus_register_object (self);
627 /* Try to set up real transparency */
628 tilda_window_setup_real_transparency (self);
630 gtk_container_add (GTK_CONTAINER(self->window), self->notebook);
631 g_object_set (G_OBJECT(self->notebook), "can-focus", FALSE, NULL);
632 gtk_widget_show (self->notebook);
634 // FIXME: Remove these, and replace with reads from the config system
635 gchar *mykey = g_strdup_printf ("F%d", self->number+3); // TERRIBLE HACK
636 g_object_set (G_OBJECT(self), "key", mykey, NULL);
638 g_object_set (G_OBJECT(self), "x-position", 0, "y-position", 0, NULL);
639 g_object_set (G_OBJECT(self), "height", 400, "width", 1680, NULL);
640 g_object_set (G_OBJECT(self), "keep-above", TRUE, "stick", TRUE, NULL);
641 g_object_set (G_OBJECT(self), "hidden-at-start", FALSE, NULL);
643 gtk_window_set_decorated (GTK_WINDOW(self->window), FALSE);
645 // FIXME: It should be configurable how many terms we add at startup
646 tilda_window_add_terminal (self);
647 tilda_window_add_terminal (self);
649 /* Show us if we're ready. If not, just remain hidden. All sub-widgets must
650 * be gtk_widget_show()n by this point. */
651 if (!self->hidden_at_start)
653 gtk_widget_show (self->window);
654 self->state = WINDOW_DOWN;
657 self->state = WINDOW_UP;
663 tilda_window_dispose (GObject *obj)
667 TildaWindow *self = (TildaWindow *) obj;
669 /* We don't want to run dispose twice, so just return immediately */
670 if (self->dispose_has_run)
674 * In dispose, you are supposed to free all types referenced from this
675 * object which might themselves hold a reference to self. Generally,
676 * the most simple solution is to unref all members on which you own a
679 * NOTE: See the following for how to deal with GtkObject-derived things:
680 * http://library.gnome.org/devel/gtk/unstable/GtkObject.html
682 g_ptr_array_foreach (self->terms, g_object_unref, NULL);
683 gtk_widget_destroy (self->window);
685 /* Unbind if we were set */
687 tomboy_keybinder_unbind (self->key, tilda_window_keybinding_cb);
689 /* Chain up to the parent class */
690 G_OBJECT_CLASS (parent_class)->dispose (obj);
694 tilda_window_finalize (GObject *obj)
698 TildaWindow *self = (TildaWindow *) obj;
701 * Here, complete the object's destruction.
702 * You might not need to do much...
704 // TODO: g_free() any primitives here
705 g_ptr_array_free (self->terms, TRUE);
708 /* Chain up to the parent class */
709 G_OBJECT_CLASS (parent_class)->finalize (obj);
713 tilda_window_class_init (gpointer g_class,
714 gpointer g_class_data)
718 GObjectClass *gobject_class = G_OBJECT_CLASS (g_class);
719 TildaWindowClass *klass = TILDA_WINDOW_CLASS (g_class);
722 /* Hook our functions to this type */
723 gobject_class->set_property = tilda_window_set_property;
724 gobject_class->get_property = tilda_window_get_property;
725 gobject_class->dispose = tilda_window_dispose;
726 gobject_class->finalize = tilda_window_finalize;
727 gobject_class->constructor = tilda_window_constructor;
729 parent_class = g_type_class_peek_parent (klass);
731 /* Install all of the properties */
732 pspec = g_param_spec_int ("number",
736 INT_MAX, // max value
738 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
740 g_object_class_install_property (gobject_class,
744 pspec = g_param_spec_pointer ("controller",
745 _("Pointer to window's controlling TildaController"),
747 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
749 g_object_class_install_property (gobject_class,
750 TILDA_WINDOW_CONTROLLER,
753 pspec = g_param_spec_string ("key",
754 _("Window's drop-down keybinding"),
759 g_object_class_install_property (gobject_class,
763 pspec = g_param_spec_int ("height",
764 _("Window's height"),
771 g_object_class_install_property (gobject_class,
775 pspec = g_param_spec_int ("width",
783 g_object_class_install_property (gobject_class,
787 pspec = g_param_spec_int ("x-position",
788 _("Window's x position"),
795 g_object_class_install_property (gobject_class,
796 TILDA_WINDOW_X_POSITION,
799 pspec = g_param_spec_int ("y-position",
800 _("Window's y position"),
807 g_object_class_install_property (gobject_class,
808 TILDA_WINDOW_Y_POSITION,
811 pspec = g_param_spec_int ("tab-position",
812 _("Position of window's tab bar"),
819 g_object_class_install_property (gobject_class,
820 TILDA_WINDOW_TAB_POSITION,
823 pspec = g_param_spec_int ("animation-orientation",
824 _("Window's animation orientation"),
831 g_object_class_install_property (gobject_class,
832 TILDA_WINDOW_ANIMATION_ORIENTATION,
835 pspec = g_param_spec_int ("animation-delay",
836 _("Amount of time in milliseconds between animation intervals"),
843 g_object_class_install_property (gobject_class,
844 TILDA_WINDOW_ANIMATION_DELAY,
847 pspec = g_param_spec_boolean ("keep-above",
848 _("Keep this window above all others"),
853 g_object_class_install_property (gobject_class,
854 TILDA_WINDOW_KEEP_ABOVE,
857 pspec = g_param_spec_boolean ("skip-taskbar-hint",
858 _("Hide this window in the taskbar if TRUE"),
863 g_object_class_install_property (gobject_class,
864 TILDA_WINDOW_SKIP_TASKBAR_HINT,
867 pspec = g_param_spec_boolean ("stick",
868 _("Display this window on all workspaces"),
873 g_object_class_install_property (gobject_class,
877 pspec = g_param_spec_boolean ("hidden-at-start",
878 _("Hide the window when it is first created"),
883 g_object_class_install_property (gobject_class,
884 TILDA_WINDOW_HIDDEN_AT_START,
887 pspec = g_param_spec_boolean ("centered-horizontally",
888 _("Center the window horizontally"),
893 g_object_class_install_property (gobject_class,
894 TILDA_WINDOW_CENTERED_HORIZONTALLY,
897 pspec = g_param_spec_boolean ("centered-vertically",
898 _("Center the window vertically"),
903 g_object_class_install_property (gobject_class,
904 TILDA_WINDOW_CENTERED_VERTICALLY,
907 pspec = g_param_spec_boolean ("have-real-transparency",
908 NULL, NULL, FALSE, G_PARAM_READABLE);
910 g_object_class_install_property (gobject_class,
911 TILDA_WINDOW_HAVE_REAL_TRANSPARENCY,
914 /* Hook the TildaWindow type into DBus */
915 dbus_g_object_type_install_info (tilda_window_get_type(), &dbus_glib_tilda_window_object_info);
919 tilda_window_get_type (void)
921 static GType type = 0;
925 static const GTypeInfo info = {
926 sizeof (TildaWindowClass),
927 NULL, /* base_init */
928 NULL, /* base_finalize */
929 tilda_window_class_init, /* class_init */
930 NULL, /* class_finalize */
931 NULL, /* class_data */
932 sizeof (TildaWindow),
934 tilda_window_instance_init, /* instance_init */
937 type = g_type_register_static (G_TYPE_OBJECT,
946 /* vim: set ts=4 sts=4 sw=4 noet tw=112: */