.
1 /*
2 Copyright (C) 2012, 2013, 2014, 2015 Johan Mattsson
3
4 This library is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 3 of the
7 License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13 */
14
15 namespace BirdFont {
16
17 public interface NativeWindow : GLib.Object {
18
19 public static const int HIDDEN = 0;
20 public static const int VISIBLE = 1;
21
22 public abstract void file_chooser (string title, FileChooser file_chooser_callback, uint flags);
23
24 public abstract void update_window_size ();
25
26 public abstract string get_clipboard_data ();
27 public abstract void set_clipboard (string data);
28 public abstract void set_inkscape_clipboard (string data);
29
30 public abstract void color_selection (ColorTool color_tool);
31
32 public abstract void set_scrollbar_size (double size);
33 public abstract void set_scrollbar_position (double position);
34
35 /** Show overwrite dialog */
36 public abstract void set_overwrite_dialog (OverWriteDialogListener dialog);
37
38 /** Notify the UI about the new font. */
39 public abstract void font_loaded ();
40
41 /** Exit the application. */
42 public abstract void quit ();
43
44 /** Convert an image to PNG format. */
45 public abstract bool convert_to_png (string from, string to);
46
47 /** Export fonts in a background thread. */
48 public abstract void export_font ();
49
50 /** Load font in a background thread. */
51 public abstract void load ();
52
53 /** Save font in a background thread. */
54 public abstract void save ();
55
56 /** Load images in a background thread. */
57 public abstract void load_background_image ();
58
59 /** Load images in a background thread. */
60 public abstract void run_background_thread (Task t);
61
62 /** Copy text to clipboard. */
63 public abstract void set_clipboard_text (string text);
64
65 /** Get text from clipboard. */
66 public abstract string get_clipboard_text ();
67
68 /** @return true if the current font can be exported. */
69 public abstract bool can_export ();
70
71 /** Set cursor visibility */
72 public abstract void set_cursor (int visible);
73 }
74
75 }
76