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 /* Check that no other windows are using the key */
302 // FIXME: there should be a hidden option to disable this. Maybe some people want
303 // to have logs in two Tildas, and just show them with one key. Crazy...
304 if (tilda_controller_global_key_in_use(TILDA_CONTROLLER(self->controller), new_key))
307 /* Unbind if we were set */
309 tomboy_keybinder_unbind (self->key, tilda_window_keybinding_cb);
311 ret = tomboy_keybinder_bind (new_key, tilda_window_keybinding_cb, self);
313 /* If it was successful, update the self->key variable and be done with it */
317 self->key = g_strdup (new_key);
321 g_printerr (_("Bind key '%s' failed. Reverting to original keybinding\n"), self->key);
323 /* Not successful, so rebind the old key, and return FALSE */
324 if (self->key != NULL && strcmp("",self->key) != 0)
326 ret = tomboy_keybinder_bind (self->key, tilda_window_keybinding_cb, self);
328 /* Check that it went ok */
330 g_printerr (_("Unable to re-bind original key '%s'. Oh shit...\n"), self->key);
333 g_printerr (_("No original key to revert to!\n"));
339 tilda_window_dbus_register_object (TildaWindow *self)
342 debug_assert (TILDA_IS_WINDOW(self));
346 // Register this object with DBus
347 object_path = g_strdup_printf ("/net/sourceforge/Tilda/Window%d", self->number);
348 dbus_g_connection_register_g_object (dbus_connection, object_path, G_OBJECT(self));
349 g_free (object_path);
352 /*******************************************************************************
353 * ALL GOBJECT STUFF BELOW PLEASE
354 ******************************************************************************/
356 static GObjectClass *parent_class = NULL;
358 enum tilda_window_properties {
359 TILDA_WINDOW_NUMBER = 1,
360 TILDA_WINDOW_CONTROLLER,
366 TILDA_WINDOW_X_POSITION,
367 TILDA_WINDOW_Y_POSITION,
369 TILDA_WINDOW_TAB_POSITION,
370 TILDA_WINDOW_ANIMATION_ORIENTATION,
371 TILDA_WINDOW_ANIMATION_DELAY,
373 TILDA_WINDOW_KEEP_ABOVE,
374 TILDA_WINDOW_SKIP_TASKBAR_HINT,
376 TILDA_WINDOW_HIDDEN_AT_START,
377 TILDA_WINDOW_CENTERED_HORIZONTALLY,
378 TILDA_WINDOW_CENTERED_VERTICALLY,
380 TILDA_WINDOW_HAVE_REAL_TRANSPARENCY,
384 tilda_window_instance_init (GTypeInstance *instance,
389 TildaWindow *self = (TildaWindow *) instance;
390 self->dispose_has_run = FALSE;
392 /* Initialize all properties */
393 self->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
394 self->notebook = gtk_notebook_new ();
395 self->terms = g_ptr_array_new ();
397 /* Somewhat of a "poison" value, incase we don't set this */
398 self->number = 0xdeadbeef;
399 self->controller = NULL;
401 self->state = WINDOW_UP;
405 tilda_window_set_property (GObject *object,
410 TildaWindow *self = (TildaWindow *) object;
412 switch (property_id) {
414 case TILDA_WINDOW_NUMBER:
415 self->number = g_value_get_int (value);
416 debug_printf ("window number: %d\n", self->number);
419 case TILDA_WINDOW_CONTROLLER:
420 self->controller = g_value_get_pointer (value);
421 debug_printf ("window controller: 0x%x\n", self->controller);
424 case TILDA_WINDOW_KEY:
425 tilda_window_try_to_bind_key (self, g_value_get_string (value));
426 debug_printf ("window key %s\n", self->key);
429 case TILDA_WINDOW_HEIGHT:
430 self->height = g_value_get_int (value);
431 gtk_widget_set_size_request (self->window, self->width, self->height);
432 gtk_window_resize (GTK_WINDOW(self->window), self->width, self->height);
433 debug_printf ("window height: %d\n", self->height);
436 case TILDA_WINDOW_WIDTH:
437 self->width = g_value_get_int (value);
438 gtk_widget_set_size_request (self->window, self->width, self->height);
439 gtk_window_resize (GTK_WINDOW(self->window), self->width, self->height);
440 debug_printf ("window width: %d\n", self->width);
443 case TILDA_WINDOW_X_POSITION:
444 self->x_position = g_value_get_int (value);
445 gtk_window_move (GTK_WINDOW(self->window), self->x_position, self->y_position);
446 debug_printf ("window x position: %d\n", self->x_position);
449 case TILDA_WINDOW_Y_POSITION:
450 self->y_position = g_value_get_int (value);
451 gtk_window_move (GTK_WINDOW(self->window), self->x_position, self->y_position);
452 debug_printf ("window y position: %d\n", self->y_position);
455 case TILDA_WINDOW_TAB_POSITION:
456 self->tab_position = g_value_get_int (value);
457 gtk_notebook_set_tab_pos (GTK_NOTEBOOK(self->notebook), self->tab_position);
458 debug_printf ("window tab position: %d\n", self->tab_position);
461 case TILDA_WINDOW_ANIMATION_ORIENTATION:
462 self->animation_orientation = g_value_get_int (value);
463 debug_printf ("window animation orientation: %d\n", self->animation_orientation);
466 case TILDA_WINDOW_ANIMATION_DELAY:
467 self->animation_delay = g_value_get_int (value);
468 debug_printf ("window animation delay: %d\n", self->animation_delay);
471 case TILDA_WINDOW_KEEP_ABOVE:
472 self->keep_above = g_value_get_boolean (value);
473 gtk_window_set_keep_above (GTK_WINDOW(self->window), self->keep_above);
474 debug_printf ("window keep above: %d\n", self->keep_above);
477 case TILDA_WINDOW_SKIP_TASKBAR_HINT:
478 self->skip_taskbar_hint = g_value_get_boolean (value);
479 gtk_window_set_skip_taskbar_hint (GTK_WINDOW(self->window), self->skip_taskbar_hint);
480 debug_printf ("window skip taskbar hint: %d\n", self->skip_taskbar_hint);
483 case TILDA_WINDOW_STICK:
484 self->stick = g_value_get_boolean (value);
486 /* This is moderately ugly, but GTK+ does it this way... */
487 self->stick ? gtk_window_stick (GTK_WINDOW(self->window))
488 : gtk_window_unstick (GTK_WINDOW(self->window));
489 debug_printf ("window stick: %d\n", self->stick);
492 case TILDA_WINDOW_HIDDEN_AT_START:
493 self->hidden_at_start = g_value_get_boolean (value);
494 debug_printf ("window hidden at start: %d\n", self->hidden_at_start);
497 case TILDA_WINDOW_CENTERED_HORIZONTALLY:
498 self->centered_horizontally = g_value_get_boolean (value);
499 if (self->centered_horizontally)
500 tilda_window_center_horizontally (self);
501 debug_printf ("window centered horizontally: %d\n", self->centered_horizontally);
504 case TILDA_WINDOW_CENTERED_VERTICALLY:
505 self->centered_vertically = g_value_get_boolean (value);
506 if (self->centered_vertically)
507 tilda_window_center_vertically (self);
508 debug_printf ("window centered vertically: %d\n", self->centered_vertically);
511 case TILDA_WINDOW_HAVE_REAL_TRANSPARENCY:
512 self->have_real_transparency = g_value_get_boolean (value);
513 debug_printf ("window have real transp: %d\n", self->have_real_transparency);
517 /* We don't have this property */
518 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
524 tilda_window_get_property (GObject *object,
529 TildaWindow *self = (TildaWindow *) object;
531 switch (property_id) {
533 case TILDA_WINDOW_NUMBER:
534 g_value_set_int (value, self->number);
537 case TILDA_WINDOW_CONTROLLER:
538 g_value_set_pointer (value, self->controller);
541 case TILDA_WINDOW_KEY:
542 g_value_set_string (value, self->key);
545 case TILDA_WINDOW_HEIGHT:
546 g_value_set_int (value, self->height);
549 case TILDA_WINDOW_WIDTH:
550 g_value_set_int (value, self->width);
553 case TILDA_WINDOW_X_POSITION:
554 g_value_set_int (value, self->x_position);
557 case TILDA_WINDOW_Y_POSITION:
558 g_value_set_int (value, self->y_position);
561 case TILDA_WINDOW_TAB_POSITION:
562 g_value_set_int (value, self->tab_position);
565 case TILDA_WINDOW_ANIMATION_ORIENTATION:
566 g_value_set_int (value, self->animation_orientation);
569 case TILDA_WINDOW_ANIMATION_DELAY:
570 g_value_set_int (value, self->animation_delay);
573 case TILDA_WINDOW_KEEP_ABOVE:
574 g_value_set_boolean (value, self->keep_above);
577 case TILDA_WINDOW_SKIP_TASKBAR_HINT:
578 g_value_set_boolean (value, self->skip_taskbar_hint);
581 case TILDA_WINDOW_STICK:
582 g_value_set_boolean (value, self->stick);
585 case TILDA_WINDOW_HIDDEN_AT_START:
586 g_value_set_boolean (value, self->hidden_at_start);
589 case TILDA_WINDOW_CENTERED_HORIZONTALLY:
590 g_value_set_boolean (value, self->centered_horizontally);
593 case TILDA_WINDOW_CENTERED_VERTICALLY:
594 g_value_set_boolean (value, self->centered_vertically);
597 case TILDA_WINDOW_HAVE_REAL_TRANSPARENCY:
598 g_value_set_boolean (value, self->have_real_transparency);
602 /* We don't have this property */
603 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
609 tilda_window_constructor (GType type,
610 guint n_construct_properties,
611 GObjectConstructParam *construct_properties)
618 /* Invoke parent constructor */
619 TildaWindowClass *klass;
620 klass = TILDA_WINDOW_CLASS (g_type_class_peek (TILDA_TYPE_WINDOW));
621 obj = parent_class->constructor (type,
622 n_construct_properties,
623 construct_properties);
625 /* Do other stuff here. The object is ready to go now, and all
626 * ctor properties have been set.
628 self = TILDA_WINDOW(obj);
630 /* Register this object with DBus */
631 tilda_window_dbus_register_object (self);
633 /* Try to set up real transparency */
634 tilda_window_setup_real_transparency (self);
636 gtk_container_add (GTK_CONTAINER(self->window), self->notebook);
637 g_object_set (G_OBJECT(self->notebook), "can-focus", FALSE, NULL);
638 gtk_widget_show (self->notebook);
640 // FIXME: Remove these, and replace with reads from the config system
641 gchar *mykey = g_strdup_printf ("F%d", self->number+3); // TERRIBLE HACK
642 g_object_set (G_OBJECT(self), "key", mykey, NULL);
644 g_object_set (G_OBJECT(self), "x-position", 0, "y-position", 0, NULL);
645 g_object_set (G_OBJECT(self), "height", 400, "width", 1680, NULL);
646 g_object_set (G_OBJECT(self), "keep-above", TRUE, "stick", TRUE, NULL);
647 g_object_set (G_OBJECT(self), "hidden-at-start", FALSE, NULL);
649 gtk_window_set_decorated (GTK_WINDOW(self->window), FALSE);
651 // FIXME: It should be configurable how many terms we add at startup
652 tilda_window_add_terminal (self);
653 tilda_window_add_terminal (self);
655 /* Show us if we're ready. If not, just remain hidden. All sub-widgets must
656 * be gtk_widget_show()n by this point. */
657 if (!self->hidden_at_start)
659 gtk_widget_show (self->window);
660 self->state = WINDOW_DOWN;
663 self->state = WINDOW_UP;
669 tilda_window_dispose (GObject *obj)
673 TildaWindow *self = (TildaWindow *) obj;
675 /* We don't want to run dispose twice, so just return immediately */
676 if (self->dispose_has_run)
680 * In dispose, you are supposed to free all types referenced from this
681 * object which might themselves hold a reference to self. Generally,
682 * the most simple solution is to unref all members on which you own a
685 * NOTE: See the following for how to deal with GtkObject-derived things:
686 * http://library.gnome.org/devel/gtk/unstable/GtkObject.html
688 g_ptr_array_foreach (self->terms, g_object_unref, NULL);
689 gtk_widget_destroy (self->window);
691 /* Unbind if we were set */
693 tomboy_keybinder_unbind (self->key, tilda_window_keybinding_cb);
695 /* Chain up to the parent class */
696 G_OBJECT_CLASS (parent_class)->dispose (obj);
700 tilda_window_finalize (GObject *obj)
704 TildaWindow *self = (TildaWindow *) obj;
707 * Here, complete the object's destruction.
708 * You might not need to do much...
710 // TODO: g_free() any primitives here
711 g_ptr_array_free (self->terms, TRUE);
714 /* Chain up to the parent class */
715 G_OBJECT_CLASS (parent_class)->finalize (obj);
719 tilda_window_class_init (gpointer g_class,
720 gpointer g_class_data)
724 GObjectClass *gobject_class = G_OBJECT_CLASS (g_class);
725 TildaWindowClass *klass = TILDA_WINDOW_CLASS (g_class);
728 /* Hook our functions to this type */
729 gobject_class->set_property = tilda_window_set_property;
730 gobject_class->get_property = tilda_window_get_property;
731 gobject_class->dispose = tilda_window_dispose;
732 gobject_class->finalize = tilda_window_finalize;
733 gobject_class->constructor = tilda_window_constructor;
735 parent_class = g_type_class_peek_parent (klass);
737 /* Install all of the properties */
738 pspec = g_param_spec_int ("number",
742 INT_MAX, // max value
744 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
746 g_object_class_install_property (gobject_class,
750 pspec = g_param_spec_pointer ("controller",
751 _("Pointer to window's controlling TildaController"),
753 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
755 g_object_class_install_property (gobject_class,
756 TILDA_WINDOW_CONTROLLER,
759 pspec = g_param_spec_string ("key",
760 _("Window's drop-down keybinding"),
765 g_object_class_install_property (gobject_class,
769 pspec = g_param_spec_int ("height",
770 _("Window's height"),
777 g_object_class_install_property (gobject_class,
781 pspec = g_param_spec_int ("width",
789 g_object_class_install_property (gobject_class,
793 pspec = g_param_spec_int ("x-position",
794 _("Window's x position"),
801 g_object_class_install_property (gobject_class,
802 TILDA_WINDOW_X_POSITION,
805 pspec = g_param_spec_int ("y-position",
806 _("Window's y position"),
813 g_object_class_install_property (gobject_class,
814 TILDA_WINDOW_Y_POSITION,
817 pspec = g_param_spec_int ("tab-position",
818 _("Position of window's tab bar"),
825 g_object_class_install_property (gobject_class,
826 TILDA_WINDOW_TAB_POSITION,
829 pspec = g_param_spec_int ("animation-orientation",
830 _("Window's animation orientation"),
837 g_object_class_install_property (gobject_class,
838 TILDA_WINDOW_ANIMATION_ORIENTATION,
841 pspec = g_param_spec_int ("animation-delay",
842 _("Amount of time in milliseconds between animation intervals"),
849 g_object_class_install_property (gobject_class,
850 TILDA_WINDOW_ANIMATION_DELAY,
853 pspec = g_param_spec_boolean ("keep-above",
854 _("Keep this window above all others"),
859 g_object_class_install_property (gobject_class,
860 TILDA_WINDOW_KEEP_ABOVE,
863 pspec = g_param_spec_boolean ("skip-taskbar-hint",
864 _("Hide this window in the taskbar if TRUE"),
869 g_object_class_install_property (gobject_class,
870 TILDA_WINDOW_SKIP_TASKBAR_HINT,
873 pspec = g_param_spec_boolean ("stick",
874 _("Display this window on all workspaces"),
879 g_object_class_install_property (gobject_class,
883 pspec = g_param_spec_boolean ("hidden-at-start",
884 _("Hide the window when it is first created"),
889 g_object_class_install_property (gobject_class,
890 TILDA_WINDOW_HIDDEN_AT_START,
893 pspec = g_param_spec_boolean ("centered-horizontally",
894 _("Center the window horizontally"),
899 g_object_class_install_property (gobject_class,
900 TILDA_WINDOW_CENTERED_HORIZONTALLY,
903 pspec = g_param_spec_boolean ("centered-vertically",
904 _("Center the window vertically"),
909 g_object_class_install_property (gobject_class,
910 TILDA_WINDOW_CENTERED_VERTICALLY,
913 pspec = g_param_spec_boolean ("have-real-transparency",
914 NULL, NULL, FALSE, G_PARAM_READABLE);
916 g_object_class_install_property (gobject_class,
917 TILDA_WINDOW_HAVE_REAL_TRANSPARENCY,
920 /* Hook the TildaWindow type into DBus */
921 dbus_g_object_type_install_info (tilda_window_get_type(), &dbus_glib_tilda_window_object_info);
925 tilda_window_get_type (void)
927 static GType type = 0;
931 static const GTypeInfo info = {
932 sizeof (TildaWindowClass),
933 NULL, /* base_init */
934 NULL, /* base_finalize */
935 tilda_window_class_init, /* class_init */
936 NULL, /* class_finalize */
937 NULL, /* class_data */
938 sizeof (TildaWindow),
940 tilda_window_instance_init, /* instance_init */
943 type = g_type_register_static (G_TYPE_OBJECT,
952 /* vim: set ts=4 sts=4 sw=4 noet tw=112: */