1 /* 2 * Copyright (C) 2001 Havoc Pennington 3 * Copyright (C) 2016 Alberts Muktupāvels 4 * 5 * This program is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #ifndef META_DRAW_SPEC_PRIVATE_H 20 #define META_DRAW_SPEC_PRIVATE_H 21 22 #include <gdk/gdk.h> 23 24 #include "meta-rectangle-private.h" 25 26 G_BEGIN_DECLS 27 28 typedef struct _MetaDrawSpec MetaDrawSpec; 29 typedef struct _MetaThemeMetacity MetaThemeMetacity; 30 typedef struct _MetaPositionExprEnv MetaPositionExprEnv; 31 32 struct _MetaPositionExprEnv 33 { 34 MetaRectangleDouble rect; 35 36 /* size of an object being drawn, if it has a natural size */ 37 gdouble object_width; 38 gdouble object_height; 39 40 /* global object sizes, always available */ 41 gdouble left_width; 42 gdouble right_width; 43 gdouble top_height; 44 gdouble bottom_height; 45 gdouble title_width; 46 gdouble title_height; 47 gdouble frame_x_center; 48 gdouble frame_y_center; 49 gdouble mini_icon_width; 50 gdouble mini_icon_height; 51 gdouble icon_width; 52 gdouble icon_height; 53 54 gint scale; 55 }; 56 57 G_GNUC_INTERNAL 58 MetaDrawSpec *meta_draw_spec_new (MetaThemeMetacity *metacity, 59 const char *expr, 60 GError **error); 61 62 G_GNUC_INTERNAL 63 void meta_draw_spec_free (MetaDrawSpec *spec); 64 65 G_GNUC_INTERNAL 66 gdouble meta_draw_spec_parse_x_position (MetaDrawSpec *spec, 67 const MetaPositionExprEnv *env); 68 69 G_GNUC_INTERNAL 70 gdouble meta_draw_spec_parse_y_position (MetaDrawSpec *spec, 71 const MetaPositionExprEnv *env); 72 73 G_GNUC_INTERNAL 74 gdouble meta_draw_spec_parse_size (MetaDrawSpec *spec, 75 const MetaPositionExprEnv *env); 76 77 G_END_DECLS 78 79 #endif 80