Lines Matching refs:window

80 	void (* closed) (EvAnnotationWindow *window);
81 void (* moved) (EvAnnotationWindow *window,
98 fevent->focus_change.window = gtk_widget_get_window (widget); in G_DEFINE_TYPE()
100 if (fevent->focus_change.window) in G_DEFINE_TYPE()
101 g_object_ref (fevent->focus_change.window); in G_DEFINE_TYPE()
109 ev_annotation_window_sync_contents (EvAnnotationWindow *window) in ev_annotation_window_sync_contents() argument
114 EvAnnotation *annot = window->annotation; in ev_annotation_window_sync_contents()
116 buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (window->text_view)); in ev_annotation_window_sync_contents()
124 ev_annotation_window_set_color (EvAnnotationWindow *window, in ev_annotation_window_set_color() argument
143 gtk_style_context_add_provider (gtk_widget_get_style_context (GTK_WIDGET (window)), in ev_annotation_window_set_color()
145 gtk_style_context_add_provider (gtk_widget_get_style_context (window->close_button), in ev_annotation_window_set_color()
147 gtk_style_context_add_class (gtk_widget_get_style_context (window->close_button), "circular"); in ev_annotation_window_set_color()
151 ev_annotation_window_set_opacity (EvAnnotationWindow *window, in ev_annotation_window_set_opacity() argument
154 gtk_widget_set_opacity (GTK_WIDGET (window), opacity); in ev_annotation_window_set_opacity()
155 gtk_widget_set_opacity (GTK_WIDGET (window->text_view), opacity); in ev_annotation_window_set_opacity()
161 EvAnnotationWindow *window) in ev_annotation_window_label_changed() argument
165 gtk_window_set_title (GTK_WINDOW (window), label); in ev_annotation_window_label_changed()
166 gtk_label_set_text (GTK_LABEL (window->title), label); in ev_annotation_window_label_changed()
172 EvAnnotationWindow *window) in ev_annotation_window_color_changed() argument
177 ev_annotation_window_set_color (window, &rgba); in ev_annotation_window_color_changed()
183 EvAnnotationWindow *window) in ev_annotation_window_opacity_changed() argument
188 ev_annotation_window_set_opacity (window, opacity); in ev_annotation_window_opacity_changed()
194 EvAnnotationWindow *window = EV_ANNOTATION_WINDOW (object); in ev_annotation_window_dispose() local
196 if (window->annotation) { in ev_annotation_window_dispose()
197 ev_annotation_window_sync_contents (window); in ev_annotation_window_dispose()
198 g_object_unref (window->annotation); in ev_annotation_window_dispose()
199 window->annotation = NULL; in ev_annotation_window_dispose()
211 EvAnnotationWindow *window = EV_ANNOTATION_WINDOW (object); in ev_annotation_window_set_property() local
215 window->annotation = g_value_dup_object (value); in ev_annotation_window_set_property()
218 window->parent = g_value_get_object (value); in ev_annotation_window_set_property()
226 ev_annotation_window_resize (EvAnnotationWindow *window, in ev_annotation_window_resize() argument
231 gtk_window_begin_resize_drag (GTK_WINDOW (window), in ev_annotation_window_resize()
232 window->resize_sw == ebox ? in ev_annotation_window_resize()
245 EvAnnotationWindow *window) in ev_annotation_window_set_resize_cursor() argument
257 widget == window->resize_sw ? in ev_annotation_window_set_resize_cursor()
278 ev_annotation_window_close (EvAnnotationWindow *window) in ev_annotation_window_close() argument
280 gtk_widget_hide (GTK_WIDGET (window)); in ev_annotation_window_close()
281 g_signal_emit (window, signals[CLOSED], 0); in ev_annotation_window_close()
288 EvAnnotationWindow *window = EV_ANNOTATION_WINDOW (widget); in ev_annotation_window_button_press_event() local
291 window->in_move = TRUE; in ev_annotation_window_button_press_event()
292 window->x = event->x_root - event->x; in ev_annotation_window_button_press_event()
293 window->y = event->y_root - event->y; in ev_annotation_window_button_press_event()
306 ev_annotation_window_init (EvAnnotationWindow *window) in ev_annotation_window_init() argument
317 gtk_widget_set_can_focus (GTK_WIDGET (window), TRUE); in ev_annotation_window_init()
332 window); in ev_annotation_window_init()
334 window->title = gtk_label_new (NULL); in ev_annotation_window_init()
335 gtk_container_add (GTK_CONTAINER (header), window->title); in ev_annotation_window_init()
336 gtk_widget_show (window->title); in ev_annotation_window_init()
341window->close_button = gtk_button_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_BUTTO… in ev_annotation_window_init()
342 g_signal_connect_swapped (window->close_button, "clicked", in ev_annotation_window_init()
344 window); in ev_annotation_window_init()
346 gtk_box_pack_start (GTK_BOX (hbox), window->close_button, FALSE, FALSE, 0); in ev_annotation_window_init()
347 gtk_widget_show (window->close_button); in ev_annotation_window_init()
354 window->text_view = gtk_text_view_new (); in ev_annotation_window_init()
357 window->spellcheck_view = NULL; in ev_annotation_window_init()
358window->spellcheck_view = gspell_text_view_get_from_gtk_text_view (GTK_TEXT_VIEW (window->text_vie… in ev_annotation_window_init()
359 gspell_text_view_basic_setup (window->spellcheck_view); in ev_annotation_window_init()
362 gtk_container_set_border_width (GTK_CONTAINER (window->text_view), 6); in ev_annotation_window_init()
363 gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (window->text_view), GTK_WRAP_WORD); in ev_annotation_window_init()
364 g_signal_connect (window->text_view, "state-flags-changed", in ev_annotation_window_init()
366 window); in ev_annotation_window_init()
367 gtk_container_add (GTK_CONTAINER (swindow), window->text_view); in ev_annotation_window_init()
368 gtk_widget_show (window->text_view); in ev_annotation_window_init()
376 window->resize_sw = gtk_event_box_new (); in ev_annotation_window_init()
377 gtk_widget_add_events (window->resize_sw, GDK_BUTTON_PRESS_MASK); in ev_annotation_window_init()
378 g_signal_connect_swapped (window->resize_sw, "button-press-event", in ev_annotation_window_init()
380 window); in ev_annotation_window_init()
381 g_signal_connect (window->resize_sw, "realize", in ev_annotation_window_init()
383 window); in ev_annotation_window_init()
389 gtk_container_add (GTK_CONTAINER (window->resize_sw), icon); in ev_annotation_window_init()
391 gtk_box_pack_start (GTK_BOX (hbox), window->resize_sw, FALSE, FALSE, 0); in ev_annotation_window_init()
392 gtk_widget_show (window->resize_sw); in ev_annotation_window_init()
394 window->resize_se = gtk_event_box_new (); in ev_annotation_window_init()
395 gtk_widget_add_events (window->resize_se, GDK_BUTTON_PRESS_MASK); in ev_annotation_window_init()
396 g_signal_connect_swapped (window->resize_se, "button-press-event", in ev_annotation_window_init()
398 window); in ev_annotation_window_init()
399 g_signal_connect (window->resize_se, "realize", in ev_annotation_window_init()
401 window); in ev_annotation_window_init()
407 gtk_container_add (GTK_CONTAINER (window->resize_se), icon); in ev_annotation_window_init()
409 gtk_box_pack_end (GTK_BOX (hbox), window->resize_se, FALSE, FALSE, 0); in ev_annotation_window_init()
410 gtk_widget_show (window->resize_se); in ev_annotation_window_init()
415 gtk_container_add (GTK_CONTAINER (window), vbox); in ev_annotation_window_init()
418 gtk_widget_add_events (GTK_WIDGET (window), in ev_annotation_window_init()
422 gtk_container_set_border_width (GTK_CONTAINER (window), 2); in ev_annotation_window_init()
424 gtk_window_set_decorated (GTK_WINDOW (window), FALSE); in ev_annotation_window_init()
425 gtk_window_set_skip_taskbar_hint (GTK_WINDOW (window), TRUE); in ev_annotation_window_init()
426 gtk_window_set_skip_pager_hint (GTK_WINDOW (window), TRUE); in ev_annotation_window_init()
427 gtk_window_set_resizable (GTK_WINDOW (window), TRUE); in ev_annotation_window_init()
436 EvAnnotationWindow *window; in ev_annotation_window_constructor() local
449 window = EV_ANNOTATION_WINDOW (object); in ev_annotation_window_constructor()
450 annot = window->annotation; in ev_annotation_window_constructor()
453 gtk_window_set_transient_for (GTK_WINDOW (window), window->parent); in ev_annotation_window_constructor()
454 gtk_window_set_destroy_with_parent (GTK_WINDOW (window), FALSE); in ev_annotation_window_constructor()
457 window->is_open = ev_annotation_markup_get_popup_is_open (markup); in ev_annotation_window_constructor()
458 ev_annotation_markup_get_rectangle (markup, &window->rect); in ev_annotation_window_constructor()
460 rect = &window->rect; in ev_annotation_window_constructor()
463 scale = ev_document_misc_get_widget_dpi (GTK_WIDGET (window)) / 72.0; in ev_annotation_window_constructor()
464 gtk_window_resize (GTK_WINDOW (window), in ev_annotation_window_constructor()
469 ev_annotation_window_set_color (window, &color); in ev_annotation_window_constructor()
472 ev_annotation_window_set_opacity (window, opacity); in ev_annotation_window_constructor()
474 gtk_widget_set_name (GTK_WIDGET (window), ev_annotation_get_name (annot)); in ev_annotation_window_constructor()
475 gtk_window_set_title (GTK_WINDOW (window), label); in ev_annotation_window_constructor()
476 gtk_label_set_text (GTK_LABEL (window->title), label); in ev_annotation_window_constructor()
482 buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (window->text_view)); in ev_annotation_window_constructor()
488 window); in ev_annotation_window_constructor()
491 window); in ev_annotation_window_constructor()
494 window); in ev_annotation_window_constructor()
497 …text_view_set_inline_spell_checking (window->spellcheck_view, ev_annotation_window_get_enable_spel… in ev_annotation_window_constructor()
506 EvAnnotationWindow *window = EV_ANNOTATION_WINDOW (widget); in ev_annotation_window_configure_event() local
508 if (window->in_move && in ev_annotation_window_configure_event()
509 (window->x != event->x || window->y != event->y)) { in ev_annotation_window_configure_event()
510 window->x = event->x; in ev_annotation_window_configure_event()
511 window->y = event->y; in ev_annotation_window_configure_event()
521 EvAnnotationWindow *window = EV_ANNOTATION_WINDOW (widget); in ev_annotation_window_focus_in_event() local
523 if (window->in_move) { in ev_annotation_window_focus_in_event()
524 if (window->orig_x != window->x || window->orig_y != window->y) { in ev_annotation_window_focus_in_event()
525 window->orig_x = window->x; in ev_annotation_window_focus_in_event()
526 window->orig_y = window->y; in ev_annotation_window_focus_in_event()
527 g_signal_emit (window, signals[MOVED], 0, window->x, window->y); in ev_annotation_window_focus_in_event()
529 window->in_move = FALSE; in ev_annotation_window_focus_in_event()
532 gtk_widget_grab_focus (window->text_view); in ev_annotation_window_focus_in_event()
533 send_focus_change (window->text_view, TRUE); in ev_annotation_window_focus_in_event()
534 gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (window->text_view), TRUE); in ev_annotation_window_focus_in_event()
543 EvAnnotationWindow *window = EV_ANNOTATION_WINDOW (widget); in ev_annotation_window_focus_out_event() local
545 ev_annotation_window_sync_contents (window); in ev_annotation_window_focus_out_event()
622 GtkWidget *window; in ev_annotation_window_new() local
627 window = g_object_new (EV_TYPE_ANNOTATION_WINDOW, in ev_annotation_window_new()
631 return window; in ev_annotation_window_new()
635 ev_annotation_window_get_annotation (EvAnnotationWindow *window) in ev_annotation_window_get_annotation() argument
637 g_return_val_if_fail (EV_IS_ANNOTATION_WINDOW (window), NULL); in ev_annotation_window_get_annotation()
639 return window->annotation; in ev_annotation_window_get_annotation()
643 ev_annotation_window_set_annotation (EvAnnotationWindow *window, in ev_annotation_window_set_annotation() argument
646 g_return_if_fail (EV_IS_ANNOTATION_WINDOW (window)); in ev_annotation_window_set_annotation()
649 if (annot == window->annotation) in ev_annotation_window_set_annotation()
652 g_object_unref (window->annotation); in ev_annotation_window_set_annotation()
653 window->annotation = g_object_ref (annot); in ev_annotation_window_set_annotation()
654 ev_annotation_window_sync_contents (window); in ev_annotation_window_set_annotation()
655 g_object_notify (G_OBJECT (window), "annotation"); in ev_annotation_window_set_annotation()
659 ev_annotation_window_is_open (EvAnnotationWindow *window) in ev_annotation_window_is_open() argument
661 g_return_val_if_fail (EV_IS_ANNOTATION_WINDOW (window), FALSE); in ev_annotation_window_is_open()
663 return window->is_open; in ev_annotation_window_is_open()
667 ev_annotation_window_get_rectangle (EvAnnotationWindow *window, in ev_annotation_window_get_rectangle() argument
670 g_return_if_fail (EV_IS_ANNOTATION_WINDOW (window)); in ev_annotation_window_get_rectangle()
673 *rect = window->rect; in ev_annotation_window_get_rectangle()
677 ev_annotation_window_set_rectangle (EvAnnotationWindow *window, in ev_annotation_window_set_rectangle() argument
680 g_return_if_fail (EV_IS_ANNOTATION_WINDOW (window)); in ev_annotation_window_set_rectangle()
683 window->rect = *rect; in ev_annotation_window_set_rectangle()
687 ev_annotation_window_grab_focus (EvAnnotationWindow *window) in ev_annotation_window_grab_focus() argument
689 g_return_if_fail (EV_IS_ANNOTATION_WINDOW (window)); in ev_annotation_window_grab_focus()
691 if (!gtk_widget_has_focus (window->text_view)) { in ev_annotation_window_grab_focus()
692 gtk_widget_grab_focus (GTK_WIDGET (window)); in ev_annotation_window_grab_focus()
693 send_focus_change (window->text_view, TRUE); in ev_annotation_window_grab_focus()
698 ev_annotation_window_ungrab_focus (EvAnnotationWindow *window) in ev_annotation_window_ungrab_focus() argument
700 g_return_if_fail (EV_IS_ANNOTATION_WINDOW (window)); in ev_annotation_window_ungrab_focus()
702 if (gtk_widget_has_focus (window->text_view)) { in ev_annotation_window_ungrab_focus()
703 send_focus_change (window->text_view, FALSE); in ev_annotation_window_ungrab_focus()
706 ev_annotation_window_sync_contents (window); in ev_annotation_window_ungrab_focus()
710 ev_annotation_window_set_enable_spellchecking (EvAnnotationWindow *window, in ev_annotation_window_set_enable_spellchecking() argument
713 g_return_if_fail (EV_IS_ANNOTATION_WINDOW (window)); in ev_annotation_window_set_enable_spellchecking()
716 if (enable_spellchecking == ev_annotation_window_get_enable_spellchecking (window)) in ev_annotation_window_set_enable_spellchecking()
719 window->enable_spellchecking = enable_spellchecking; in ev_annotation_window_set_enable_spellchecking()
720 gspell_text_view_set_inline_spell_checking (window->spellcheck_view, enable_spellchecking); in ev_annotation_window_set_enable_spellchecking()
725 ev_annotation_window_get_enable_spellchecking (EvAnnotationWindow *window) in ev_annotation_window_get_enable_spellchecking() argument
727 g_return_val_if_fail (EV_IS_ANNOTATION_WINDOW (window), FALSE); in ev_annotation_window_get_enable_spellchecking()
729 return window->enable_spellchecking; in ev_annotation_window_get_enable_spellchecking()