The Birdfont Source Code


All Repositories / birdfont.git / blob – RSS feed

NativeWindow.vala in libbirdfont

This file is a part of the Birdfont project.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git

Revisions

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