summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog-events.h
blob: 7bc7483784fae286798b0bd641322309cf55b200 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// SPDX-License-Identifier: GPL-2.0-or-later
/** @file
 * @brief  Event handler for dialog windows
 */
/* Authors:
 *   bulia byak <bulia@dr.com>
 *
 * Copyright (C) 2003-2014 authors
 *
 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
 */

#ifndef SEEN_DIALOG_EVENTS_H
#define SEEN_DIALOG_EVENTS_H

#include <gtk/gtk.h>
 
/*
 * event callback can only accept one argument, but we need two,
 * hence this struct.
 * each dialog has a local static copy:
 *   win is the dialog window 
 *   stop is the transientize semaphore: when 0, retransientizing this dialog 
 *   is allowed
 */

namespace Gtk {
class Window;
class Entry;
}

class SPDesktop;
 
struct win_data { 
    GtkWidget *win;
    guint stop;
};


gboolean sp_dialog_event_handler ( GtkWindow *win, 
                                   GdkEvent *event, 
                                   gpointer data );

void sp_dialog_defocus_cpp         (Gtk::Window *win);
void sp_dialog_defocus_callback_cpp(Gtk::Entry *e);
void sp_dialog_defocus_on_enter_cpp(Gtk::Entry *e);

void sp_dialog_defocus           ( GtkWindow *win );
void sp_dialog_defocus_callback  ( GtkWindow *win, gpointer data );
void sp_dialog_defocus_on_enter  ( GtkWidget *w );
void sp_transientize             ( GtkWidget *win );

void on_transientize             ( SPDesktop *desktop, 
                                   win_data *wd );

void sp_transientize_callback    ( SPDesktop *desktop, 
                                   win_data *wd );

void on_dialog_hide (GtkWidget *w);
void on_dialog_unhide (GtkWidget *w);

//gboolean sp_dialog_hide (GObject *object, gpointer data);
//gboolean sp_dialog_unhide (GObject *object, gpointer data);

#endif

/*
  Local Variables:
  mode:c++
  c-file-style:"stroustrup"
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
  indent-tabs-mode:nil
  fill-column:99
  End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :