.
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 /** Notify the UI about the new font. */
31 public abstract void font_loaded ();
32
33 /** Exit the application. */
34 public abstract void quit ();
35
36 /** Convert an image to PNG format. */
37 public abstract bool convert_to_png (string from, string to);
38
39 /** Export fonts in a background thread. */
40 public abstract void export_font ();
41
42 /** Load font in a background thread. */
43 public abstract void load ();
44
45 /** Save font in a background thread. */
46 public abstract void save ();
47
48 /** Load images in a background thread. */
49 public abstract void load_background_image ();
50
51 /** Run a background thread and block the gui. */
52 public abstract void run_background_thread (Task t);
53
54 /** Run a background thread without blocking the gui. */
55 public abstract void run_non_blocking_background_thread (Task t);
56
57 /** Copy text to clipboard. */
58 public abstract void set_clipboard_text (string text);
59
60 /** Get text from clipboard. */
61 public abstract string get_clipboard_text ();
62
63 /** @return true if the current font can be exported. */
64 public abstract bool can_export ();
65
66 /** Set cursor visibility */
67 public abstract void set_cursor (int visible);
68
69 /** Scale all offscreen buffers by this factor in order to
70 * support high resolution screens.
71 */
72 public abstract double get_screen_scale ();
73
74 }
75
76 }
77