| 1 | #cxx . . $ `<file>/engines/crux/src/crux-draw.c`/include "crux-draw.h"cxx . . $ `<file>/engines/crux/src/crux-draw.h`/ |
| 2 | #include "crux-style.h"cxx . . $ `<file>/engines/crux/src/crux-style.h`/ |
| 3 | |
| 4 | #include <ge-support.h>cxx . . $ `<file>/engines/support/ge-support.h`/ |
| 5 | |
| 6 | #include <stdio.h> |
| 7 | #include <math.h> |
| 8 | #include <string.h> |
| 9 | |
| 10 | #define DEBUGcxx . . $ `engines/crux/src/crux-draw.c:10:9`! 0 |
| 11 | |
| 12 | #define DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`!(xx) ((detail) != 0 && strcmp (xx, detail) == 0) |
| 13 | |
| 14 | #define OUTLINE_SHADEcxx . . $ `engines/crux/src/crux-draw.c:14:9`! 0.5 |
| 15 | |
| 16 | #define CRUX_LIGHTcxx . . $ `engines/crux/src/crux-draw.c:16:9`!(xx, yy) ge_shade_color (&xx, 1.5, &yy) /* yy.r = xx.r + 56/255.0;yy.g = xx.g + 47/255.0;yy.b = xx.b + 45/255.0; */ |
| 17 | #define CRUX_DARKcxx . . $ `engines/crux/src/crux-draw.c:17:9`!(xx, yy) ge_shade_color (&xx, 0.9, &yy) /* yy.r = xx.r - 25/255.0;yy.g = xx.g - 27/255.0;yy.b = xx.b - 21/255.0; */ |
| 18 | |
| 19 | static GtkStyleClasscxx . . $ GtkStyleClass# *parent_style_classcxx . . $ parent_style_class.; |
| 20 | |
| 21 | static void |
| 22 | draw_hlinecxx . . $ draw_hline(8560bb68e408b10a). (GtkStylecxx . . $ GtkStyle# *style, |
| 23 | GdkWindowcxx . . $ GdkWindow# *window, |
| 24 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 25 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 26 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 27 | const gcharcxx . . $ gchar# *detail, |
| 28 | gintcxx . . $ gint# x1, gintcxx . . $ gint# x2, gintcxx . . $ gint# y); |
| 29 | |
| 30 | static void |
| 31 | draw_vlinecxx . . $ draw_vline(8560bb68e408b10a). (GtkStylecxx . . $ GtkStyle# *style, |
| 32 | GdkWindowcxx . . $ GdkWindow# *window, |
| 33 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 34 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 35 | GtkWidgetcxx . . $ GtkWidget# *widget, const gcharcxx . . $ gchar# *detail, gintcxx . . $ gint# y1, gintcxx . . $ gint# y2, gintcxx . . $ gint# x); |
| 36 | |
| 37 | static void |
| 38 | draw_shadowcxx . . $ draw_shadow(735e120c49b17d11). (GtkStylecxx . . $ GtkStyle# *style, |
| 39 | GdkWindowcxx . . $ GdkWindow# *window, |
| 40 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 41 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 42 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 43 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 44 | const gcharcxx . . $ gchar# *detail, gintcxx . . $ gint# x, gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height); |
| 45 | |
| 46 | static void |
| 47 | draw_boxcxx . . $ draw_box(735e120c49b17d11). (GtkStylecxx . . $ GtkStyle# *style, |
| 48 | GdkWindowcxx . . $ GdkWindow# *window, |
| 49 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 50 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 51 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 52 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 53 | const gcharcxx . . $ gchar# *detail, gintcxx . . $ gint# x, gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height); |
| 54 | |
| 55 | static void |
| 56 | draw_arrowcxx . . $ draw_arrow(422be73dba64f040). (GtkStylecxx . . $ GtkStyle# *style, |
| 57 | GdkWindowcxx . . $ GdkWindow# *window, |
| 58 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 59 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 60 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 61 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 62 | const gcharcxx . . $ gchar# *detail, |
| 63 | GtkArrowTypecxx . . $ GtkArrowType# arrow_type, |
| 64 | gintcxx . . $ gint# fill, gintcxx . . $ gint# x, gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height); |
| 65 | |
| 66 | static void |
| 67 | draw_checkcxx . . $ draw_check(735e120c49b17d11). (GtkStylecxx . . $ GtkStyle# *style, |
| 68 | GdkWindowcxx . . $ GdkWindow# *window, |
| 69 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 70 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 71 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 72 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 73 | const gcharcxx . . $ gchar# *detail, gintcxx . . $ gint# x, gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height); |
| 74 | static void |
| 75 | draw_optioncxx . . $ draw_option(735e120c49b17d11). (GtkStylecxx . . $ GtkStyle# *style, |
| 76 | GdkWindowcxx . . $ GdkWindow# *window, |
| 77 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 78 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 79 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 80 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 81 | const gcharcxx . . $ gchar# *detail, gintcxx . . $ gint# x, gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height); |
| 82 | |
| 83 | static void |
| 84 | draw_tabcxx . . $ draw_tab(735e120c49b17d11). (GtkStylecxx . . $ GtkStyle# *style, |
| 85 | GdkWindowcxx . . $ GdkWindow# *window, |
| 86 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 87 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 88 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 89 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 90 | const gcharcxx . . $ gchar# *detail, gintcxx . . $ gint# x, gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height); |
| 91 | |
| 92 | static void |
| 93 | draw_shadow_gapcxx . . $ draw_shadow_gap(6e03733adaa62f72). (GtkStylecxx . . $ GtkStyle# *style, |
| 94 | GdkWindowcxx . . $ GdkWindow# *window, |
| 95 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 96 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 97 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 98 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 99 | const gcharcxx . . $ gchar# *detail, |
| 100 | gintcxx . . $ gint# x, |
| 101 | gintcxx . . $ gint# y, |
| 102 | gintcxx . . $ gint# width, |
| 103 | gintcxx . . $ gint# height, |
| 104 | GtkPositionTypecxx . . $ GtkPositionType# gap_side, gintcxx . . $ gint# gap_x, gintcxx . . $ gint# gap_width); |
| 105 | |
| 106 | static void |
| 107 | draw_box_gapcxx . . $ draw_box_gap(6e03733adaa62f72). (GtkStylecxx . . $ GtkStyle# *style, |
| 108 | GdkWindowcxx . . $ GdkWindow# *window, |
| 109 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 110 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 111 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 112 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 113 | const gcharcxx . . $ gchar# *detail, |
| 114 | gintcxx . . $ gint# x, |
| 115 | gintcxx . . $ gint# y, |
| 116 | gintcxx . . $ gint# width, |
| 117 | gintcxx . . $ gint# height, |
| 118 | GtkPositionTypecxx . . $ GtkPositionType# gap_side, gintcxx . . $ gint# gap_x, gintcxx . . $ gint# gap_width); |
| 119 | |
| 120 | static void |
| 121 | draw_extensioncxx . . $ draw_extension(ab7d29722d577c46). (GtkStylecxx . . $ GtkStyle# *style, |
| 122 | GdkWindowcxx . . $ GdkWindow# *window, |
| 123 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 124 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 125 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 126 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 127 | const gcharcxx . . $ gchar# *detail, |
| 128 | gintcxx . . $ gint# x, |
| 129 | gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height, GtkPositionTypecxx . . $ GtkPositionType# gap_side); |
| 130 | |
| 131 | static void |
| 132 | draw_focuscxx . . $ draw_focus(90051e0a087ec90c). (GtkStylecxx . . $ GtkStyle# *style, |
| 133 | GdkWindowcxx . . $ GdkWindow# *window, |
| 134 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 135 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 136 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 137 | const gcharcxx . . $ gchar# *detail, |
| 138 | gintcxx . . $ gint# x, |
| 139 | gintcxx . . $ gint# y, |
| 140 | gintcxx . . $ gint# width, |
| 141 | gintcxx . . $ gint# height); |
| 142 | |
| 143 | static void |
| 144 | draw_slidercxx . . $ draw_slider(30bf754f222a37c2). (GtkStylecxx . . $ GtkStyle# *style, |
| 145 | GdkWindowcxx . . $ GdkWindow# *window, |
| 146 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 147 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 148 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 149 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 150 | const gcharcxx . . $ gchar# *detail, |
| 151 | gintcxx . . $ gint# x, |
| 152 | gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height, GtkOrientationcxx . . $ GtkOrientation# orientation); |
| 153 | |
| 154 | static void |
| 155 | draw_handlecxx . . $ draw_handle(30bf754f222a37c2). (GtkStylecxx . . $ GtkStyle# *style, |
| 156 | GdkWindowcxx . . $ GdkWindow# *window, |
| 157 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 158 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 159 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 160 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 161 | const gcharcxx . . $ gchar# *detail, |
| 162 | gintcxx . . $ gint# x, |
| 163 | gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height, GtkOrientationcxx . . $ GtkOrientation# orientation); |
| 164 | |
| 165 | |
| 166 | static void |
| 167 | paint_shadowcxx . . $ paint_shadow(6bbf0d165219276c). (cairo_tcxx . . $ cairo_t# *cr, GtkStylecxx . . $ GtkStyle# *style, |
| 168 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 169 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 170 | gdoublecxx . . $ gdouble# x, gdoublecxx . . $ gdouble# y, gdoublecxx . . $ gdouble# width, gdoublecxx . . $ gdouble# height); |
| 171 | |
| 172 | |
| 173 | /* utility functions */ |
| 174 | |
| 175 | static inline void |
| 176 | debugcxx . . $ debug(326aeb464d16410c). (const char *fmt, ...) |
| 177 | { |
| 178 | if (DEBUGcxx . . $ `engines/crux/src/crux-draw.c:10:9`!) |
| 179 | { |
| 180 | va_listcxx . . $ va_list# args; |
| 181 | va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`! (args, fmt); |
| 182 | vfprintfcxx . . $ vfprintf(bded311e54d67f9c). (stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, fmt, args); |
| 183 | va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`! (args); |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | static void |
| 188 | paint_menuitemcxx . . $ paint_menuitem(6c4a6ca02cbd6a2c). (cairo_tcxx . . $ cairo_t# *cr, GtkStylecxx . . $ GtkStyle# *style, GtkStateTypecxx . . $ GtkStateType# state_type, |
| 189 | gdoublecxx . . $ gdouble# x, gdoublecxx . . $ gdouble# y, gdoublecxx . . $ gdouble# width, gdoublecxx . . $ gdouble# height) |
| 190 | { |
| 191 | cairo_pattern_tcxx . . $ cairo_pattern_t# * crp; |
| 192 | CairoColorcxx . . $ CairoColor# c1; |
| 193 | |
| 194 | /* TODO: this is wasteful, since paint_shadow () adds an extra shadow that is |
| 195 | * drawn over by the gradient |
| 196 | */ |
| 197 | paint_shadowcxx . . $ paint_shadow(6bbf0d165219276c). (cr, style, state_type, GTK_SHADOW_INcxx . . $ GTK_SHADOW_IN., x, y, width, height); |
| 198 | |
| 199 | x += 2.0; y += 2.0; width -= 4.0; height -= 4.0; |
| 200 | |
| 201 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[state_type], &c1); |
| 202 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x, y + height); |
| 203 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.0, c1.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c1.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c1.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 204 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&c1, 1.3, &c1); |
| 205 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.35, c1.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c1.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c1.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 206 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.28, c1.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c1.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c1.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 207 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&c1, 0.6, &c1); |
| 208 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 1.0, c1.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c1.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c1.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 209 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x, y, width, height); |
| 210 | cairo_set_sourcecxx . . $ cairo_set_source(dab881992d64b89). (cr, crp); |
| 211 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 212 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (crp); |
| 213 | } |
| 214 | |
| 215 | static void |
| 216 | paint_buttoncxx . . $ paint_button(715eb20d123bea91). (cairo_tcxx . . $ cairo_t# *cr, GtkStylecxx . . $ GtkStyle# *style, |
| 217 | GtkStateTypecxx . . $ GtkStateType# state_type, GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 218 | gbooleancxx . . $ gboolean# has_focus, gbooleancxx . . $ gboolean# extra_shadow, |
| 219 | gdoublecxx . . $ gdouble# x, gdoublecxx . . $ gdouble# y, gdoublecxx . . $ gdouble# width, gdoublecxx . . $ gdouble# height) |
| 220 | { |
| 221 | gdoublecxx . . $ gdouble# radius = (extra_shadow) ? 3.5 : 2.5; |
| 222 | cairo_pattern_tcxx . . $ cairo_pattern_t# *crp; |
| 223 | CairoColorcxx . . $ CairoColor# base, inner_top, inner_bot, grad_top, grad_bot, stroke; |
| 224 | gdoublecxx . . $ gdouble# h, s, b; |
| 225 | |
| 226 | if (shadow_type == GTK_SHADOW_NONEcxx . . $ GTK_SHADOW_NONE.) |
| 227 | return; |
| 228 | |
| 229 | /* calculate colours */ |
| 230 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[state_type], &base); |
| 231 | ge_hsb_from_colorcxx . . $ ge_hsb_from_color(1826c6b41b9e2178). (&base, &h, &s, &b); |
| 232 | ge_color_from_hsbcxx . . $ ge_color_from_hsb(af36d4f856444193). (h, s, b - 0.52, &stroke); |
| 233 | |
| 234 | if (extra_shadow) |
| 235 | { |
| 236 | /* extra shadow and focus indicator */ |
| 237 | if (has_focus) |
| 238 | { |
| 239 | CairoColorcxx . . $ CairoColor# c; |
| 240 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[GTK_STATE_SELECTEDcxx . . $ GTK_STATE_SELECTED.], &c); |
| 241 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, c.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b., 0.6); |
| 242 | } |
| 243 | else |
| 244 | { |
| 245 | if (state_type == GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.) |
| 246 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0, 0, 0, 0.05); |
| 247 | else |
| 248 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0, 0, 0, 0.1); |
| 249 | } |
| 250 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, x, y, width, height, radius, CR_CORNER_ALLcxx . . $ CR_CORNER_ALL.); |
| 251 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 252 | |
| 253 | --radius; |
| 254 | ++x; ++y; width -= 2; height -= 2; |
| 255 | } |
| 256 | |
| 257 | if (shadow_type == GTK_SHADOW_INcxx . . $ GTK_SHADOW_IN. || shadow_type == GTK_SHADOW_ETCHED_INcxx . . $ GTK_SHADOW_ETCHED_IN.) |
| 258 | { |
| 259 | /* outline */ |
| 260 | if (state_type == GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.) |
| 261 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->fgcxx . . $ _GtkStyle#fg. [state_type]); |
| 262 | else |
| 263 | ge_cairo_set_colorcxx . . $ ge_cairo_set_color(4f73748928299b29). (cr, &stroke); |
| 264 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, x, y, width, height, radius, CR_CORNER_ALLcxx . . $ CR_CORNER_ALL.); |
| 265 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 266 | |
| 267 | ++x; ++y; width -= 2; height -= 2; |
| 268 | |
| 269 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, x, y, width, height, radius, CR_CORNER_ALLcxx . . $ CR_CORNER_ALL.); |
| 270 | if (state_type != GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.) |
| 271 | { |
| 272 | /* gradient fill */ |
| 273 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x, y +height); |
| 274 | ge_color_from_hsbcxx . . $ ge_color_from_hsb(af36d4f856444193). (h, s, b - 0.05, &grad_top); |
| 275 | ge_color_from_hsbcxx . . $ ge_color_from_hsb(af36d4f856444193). (h, s, b - 0.2, &grad_bot); |
| 276 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.0, grad_top.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., grad_top.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., grad_top.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 277 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.3, grad_top.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., grad_top.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., grad_top.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 278 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.9, grad_bot.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., grad_bot.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., grad_bot.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 279 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 1.0, grad_bot.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., grad_bot.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., grad_bot.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 280 | cairo_set_sourcecxx . . $ cairo_set_source(dab881992d64b89). (cr, crp); |
| 281 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 282 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (crp); |
| 283 | } |
| 284 | else |
| 285 | { |
| 286 | ge_cairo_set_colorcxx . . $ ge_cairo_set_color(4f73748928299b29). (cr, &base); |
| 287 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 288 | } |
| 289 | |
| 290 | x += 0.5; y += 0.5; height--; width--; |
| 291 | |
| 292 | /* inside shadow */ |
| 293 | --radius; |
| 294 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x, y + height); |
| 295 | cairo_arccxx . . $ cairo_arc(a3ae928d36564bf1). (cr, x + radius, y + radius, radius, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`!, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`! * 1.5); |
| 296 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width, y); |
| 297 | if (state_type == GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.) |
| 298 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0.0, 0.0, 0.0, 0.1); |
| 299 | else |
| 300 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0.0, 0.0, 0.0, 0.2); |
| 301 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 302 | |
| 303 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x + 1.0, y + height); |
| 304 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + 1.0, y + 1); |
| 305 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width, y + 1); |
| 306 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width, y + height); |
| 307 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0.0, 0.0, 0.0, 0.05); |
| 308 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 309 | |
| 310 | |
| 311 | if (state_type == GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.) |
| 312 | return; |
| 313 | |
| 314 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x + 1.0, y + 1.0, width - 2, height - 1); |
| 315 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0.0, 0.0, 0.0, 0.03); |
| 316 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 317 | return; |
| 318 | } |
| 319 | |
| 320 | if (shadow_type == GTK_SHADOW_OUTcxx . . $ GTK_SHADOW_OUT. || shadow_type == GTK_SHADOW_ETCHED_OUTcxx . . $ GTK_SHADOW_ETCHED_OUT.) |
| 321 | { |
| 322 | if (state_type == GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.) |
| 323 | { |
| 324 | /* disabled gray stroke */ |
| 325 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, x, y, width, height, radius, CR_CORNER_ALLcxx . . $ CR_CORNER_ALL.); |
| 326 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->fgcxx . . $ _GtkStyle#fg. [state_type]); |
| 327 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 328 | |
| 329 | --radius; |
| 330 | ++x; ++y; width -= 2; height -= 2; |
| 331 | |
| 332 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, x, y, width, height , radius, CR_CORNER_ALLcxx . . $ CR_CORNER_ALL.); |
| 333 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->bgcxx . . $ _GtkStyle#bg. [state_type]); |
| 334 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 335 | |
| 336 | return; |
| 337 | } |
| 338 | |
| 339 | |
| 340 | ge_color_from_hsbcxx . . $ ge_color_from_hsb(af36d4f856444193). (h, s, b + 0.156, &inner_top); |
| 341 | ge_color_from_hsbcxx . . $ ge_color_from_hsb(af36d4f856444193). (h, s, b, &inner_bot); |
| 342 | ge_color_from_hsbcxx . . $ ge_color_from_hsb(af36d4f856444193). (h, s, b + 0.117, &grad_top); |
| 343 | ge_color_from_hsbcxx . . $ ge_color_from_hsb(af36d4f856444193). (h, s, b - 0.117, &grad_bot); |
| 344 | |
| 345 | /* border */ |
| 346 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, x, y, width, height, radius, CR_CORNER_ALLcxx . . $ CR_CORNER_ALL.); |
| 347 | ge_cairo_set_colorcxx . . $ ge_cairo_set_color(4f73748928299b29). (cr, &stroke); |
| 348 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 349 | |
| 350 | |
| 351 | /* inner stroke */ |
| 352 | ++x; ++y; |
| 353 | width -= 2; height -= 2; |
| 354 | --radius; |
| 355 | |
| 356 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x, y + height); |
| 357 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.0, inner_top.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., inner_top.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., inner_top.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 358 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 1.0, inner_bot.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., inner_bot.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., inner_bot.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 359 | cairo_set_sourcecxx . . $ cairo_set_source(dab881992d64b89). (cr, crp); |
| 360 | |
| 361 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, x, y, width, height, radius, CR_CORNER_ALLcxx . . $ CR_CORNER_ALL.); |
| 362 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 363 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (crp); |
| 364 | |
| 365 | |
| 366 | /* gradient */ |
| 367 | x+=.5; y+=.5; |
| 368 | width -= 1; height -= 1; |
| 369 | |
| 370 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x, y + height); |
| 371 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.0, grad_top.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., grad_top.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., grad_top.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 372 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.14, grad_top.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., grad_top.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., grad_top.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 373 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.86, grad_bot.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., grad_bot.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., grad_bot.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 374 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 1.0, grad_bot.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., grad_bot.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., grad_bot.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 375 | cairo_set_sourcecxx . . $ cairo_set_source(dab881992d64b89). (cr, crp); |
| 376 | |
| 377 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x, y, width, height); |
| 378 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 379 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (crp); |
| 380 | } |
| 381 | } |
| 382 | |
| 383 | static void |
| 384 | paint_shadowcxx . . $ paint_shadow(6bbf0d165219276c). (cairo_tcxx . . $ cairo_t# *cr, GtkStylecxx . . $ GtkStyle# *style, |
| 385 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 386 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 387 | gdoublecxx . . $ gdouble# x, gdoublecxx . . $ gdouble# y, gdoublecxx . . $ gdouble# width, gdoublecxx . . $ gdouble# height) |
| 388 | { |
| 389 | CairoColorcxx . . $ CairoColor# bg, border; |
| 390 | CairoColorcxx . . $ CairoColor# tl, bl; |
| 391 | |
| 392 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[state_type], &bg); |
| 393 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&bg, OUTLINE_SHADEcxx . . $ `engines/crux/src/crux-draw.c:14:9`!, &border); /* border */ |
| 394 | |
| 395 | x += 0.5; y += 0.5; width--; height--; |
| 396 | |
| 397 | tl.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r. = 1; tl.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g. = 1; tl.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b. = 1; tl.acxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#a. = 0.7; |
| 398 | bl.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r. = 0; bl.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g. = 0; bl.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b. = 0; bl.acxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#a. = 0.2; |
| 399 | |
| 400 | if (shadow_type == GTK_SHADOW_OUTcxx . . $ GTK_SHADOW_OUT.) |
| 401 | { |
| 402 | ge_cairo_set_colorcxx . . $ ge_cairo_set_color(4f73748928299b29). (cr, &border); |
| 403 | ge_cairo_stroke_rectanglecxx . . $ ge_cairo_stroke_rectangle(1653902e9f448da4). (cr, x, y, width, height); |
| 404 | x++; y++; width -= 2.0; height -= 2.0; |
| 405 | ge_cairo_simple_bordercxx . . $ ge_cairo_simple_border(ea4178ac8b6403de). (cr, &tl, &bl, x, y, width +1, height +1, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 406 | } |
| 407 | else if (shadow_type == GTK_SHADOW_INcxx . . $ GTK_SHADOW_IN.) |
| 408 | { |
| 409 | ge_cairo_simple_bordercxx . . $ ge_cairo_simple_border(ea4178ac8b6403de). (cr, &bl, &tl, x, y, width +1, height +1, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 410 | x++; y++; width -= 2.0; height -= 2.0; |
| 411 | ge_cairo_set_colorcxx . . $ ge_cairo_set_color(4f73748928299b29). (cr, &border); |
| 412 | ge_cairo_stroke_rectanglecxx . . $ ge_cairo_stroke_rectangle(1653902e9f448da4). (cr, x, y, width, height); |
| 413 | } |
| 414 | else if (shadow_type == GTK_SHADOW_ETCHED_INcxx . . $ GTK_SHADOW_ETCHED_IN.) |
| 415 | { |
| 416 | ge_cairo_simple_bordercxx . . $ ge_cairo_simple_border(ea4178ac8b6403de). (cr, &bl, &tl, x, y, width +1, height +1, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 417 | x++; y++; width -= 2.0; height -= 2.0; |
| 418 | ge_cairo_simple_bordercxx . . $ ge_cairo_simple_border(ea4178ac8b6403de). (cr, &tl, &bl, x, y, width +1, height +1, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 419 | } |
| 420 | else if (shadow_type == GTK_SHADOW_ETCHED_OUTcxx . . $ GTK_SHADOW_ETCHED_OUT.) |
| 421 | { |
| 422 | ge_cairo_simple_bordercxx . . $ ge_cairo_simple_border(ea4178ac8b6403de). (cr, &tl, &bl, x, y, width +1, height +1, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 423 | x++; y++; width -= 2.0; height -= 2.0; |
| 424 | ge_cairo_simple_bordercxx . . $ ge_cairo_simple_border(ea4178ac8b6403de). (cr, &bl, &tl, x, y, width +1, height +1, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 425 | } |
| 426 | |
| 427 | } |
| 428 | |
| 429 | static void |
| 430 | paint_entry_shadowcxx . . $ paint_entry_shadow(463ae507175eae42). (cairo_tcxx . . $ cairo_t# *cr, GtkStylecxx . . $ GtkStyle# *style, |
| 431 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 432 | gbooleancxx . . $ gboolean# focused, |
| 433 | gdoublecxx . . $ gdouble# x, gdoublecxx . . $ gdouble# y, gdoublecxx . . $ gdouble# width, gdoublecxx . . $ gdouble# height) |
| 434 | { |
| 435 | |
| 436 | cairo_pattern_tcxx . . $ cairo_pattern_t# *crp; |
| 437 | |
| 438 | x += 0.5; y += 0.5; |
| 439 | width -= 1.0; height -= 1.0; |
| 440 | |
| 441 | |
| 442 | /* Outer Line */ |
| 443 | if (focused) |
| 444 | { |
| 445 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->lightcxx . . $ _GtkStyle#light.[GTK_STATE_SELECTEDcxx . . $ GTK_STATE_SELECTED.]); |
| 446 | ge_cairo_stroke_rectanglecxx . . $ ge_cairo_stroke_rectangle(1653902e9f448da4). (cr, x, y, width, height); |
| 447 | } |
| 448 | else |
| 449 | { |
| 450 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x, y + height); |
| 451 | /* TODO: Find a way to calculate these values */ |
| 452 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.0, 185/255.0, 189/255.0, 182/255.0); |
| 453 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 1.0, 238/255.0, 238/255.0, 236/255.0); |
| 454 | cairo_set_sourcecxx . . $ cairo_set_source(dab881992d64b89). (cr, crp); |
| 455 | ge_cairo_stroke_rectanglecxx . . $ ge_cairo_stroke_rectangle(1653902e9f448da4). (cr, x, y, width, height); |
| 456 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (crp); |
| 457 | } |
| 458 | |
| 459 | /* inner Line */ |
| 460 | /* TODO: Find a way to calculate these values */ |
| 461 | if (state_type == GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.) |
| 462 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->fgcxx . . $ _GtkStyle#fg. [state_type]); |
| 463 | else |
| 464 | cairo_set_source_rgbcxx . . $ cairo_set_source_rgb(2bdc80def475f266). (cr, 54/255.0, 52/255.0, 54/255.0); |
| 465 | |
| 466 | ge_cairo_stroke_rectanglecxx . . $ ge_cairo_stroke_rectangle(1653902e9f448da4). (cr, x + 1.0, y + 1.0, width - 2.0, height - 2.0); |
| 467 | |
| 468 | /* inner shadow */ |
| 469 | |
| 470 | /* make sure background is initialised as shadow is only in top left */ |
| 471 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->basecxx . . $ _GtkStyle#base.[(state_type == GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.) ? GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE. : GTK_STATE_NORMALcxx . . $ GTK_STATE_NORMAL.]); |
| 472 | ge_cairo_stroke_rectanglecxx . . $ ge_cairo_stroke_rectangle(1653902e9f448da4). (cr, x + 2.0, y + 2.0, width - 4.0, height - 4.0); |
| 473 | |
| 474 | /* draw shadow */ |
| 475 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x + 2.0, y + height - 2.0); |
| 476 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + 2.0, y + 2.0); |
| 477 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width - 2.0, y + 2.0); |
| 478 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0, 0, 0, 0.12); |
| 479 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 480 | } |
| 481 | |
| 482 | static void |
| 483 | paint_scrollbar_troughcxx . . $ paint_scrollbar_trough(6e274d505e2dabf5). (cairo_tcxx . . $ cairo_t# *cr, GtkStylecxx . . $ GtkStyle# *style, GtkStateTypecxx . . $ GtkStateType# state_type, GtkOrientationcxx . . $ GtkOrientation# orientation, |
| 484 | gdoublecxx . . $ gdouble# x, gdoublecxx . . $ gdouble# y, gdoublecxx . . $ gdouble# width, gdoublecxx . . $ gdouble# height) |
| 485 | { |
| 486 | cairo_pattern_tcxx . . $ cairo_pattern_t# *crp; |
| 487 | gdoublecxx . . $ gdouble# gradient_size; |
| 488 | CairoColorcxx . . $ CairoColor# bg, tl, br, outline; |
| 489 | /* gradient_size is the size of the "shadow" at the ends of the trough |
| 490 | * it needs to be calculated so that it is a fixed size, since cairo takes a ratio when adding gradient stops |
| 491 | */ |
| 492 | |
| 493 | #define OFFWHITEcxx . . $ `engines/crux/src/crux-draw.c:493:10`! 238/255.0, 238/255.0, 238/255.0 |
| 494 | |
| 495 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->whitecxx . . $ _GtkStyle#white., &br); |
| 496 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[state_type], &bg); |
| 497 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&bg, 1.2, &tl); |
| 498 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&bg, OUTLINE_SHADEcxx . . $ `engines/crux/src/crux-draw.c:14:9`!, &outline); |
| 499 | |
| 500 | /* bevel */ |
| 501 | ge_cairo_simple_bordercxx . . $ ge_cairo_simple_border(ea4178ac8b6403de). (cr, &tl, &br, x, y, width, height, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 502 | |
| 503 | /* set co-ordinates for line drawing */ |
| 504 | x += 0.5; y += 0.5; width -= 1.0; height -= 1.0; |
| 505 | |
| 506 | x += 1.0; y += 1.0; width -= 2.0; height -= 2.0; |
| 507 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x, y, width, height); |
| 508 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->darkcxx . . $ _GtkStyle#dark.[state_type]); |
| 509 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 510 | |
| 511 | if (orientation == GTK_ORIENTATION_HORIZONTALcxx . . $ GTK_ORIENTATION_HORIZONTAL.) |
| 512 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x, y, width, height / 2 - 1); |
| 513 | else |
| 514 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x, y, width /2 - 1, height); |
| 515 | |
| 516 | cairo_set_source_rgbcxx . . $ cairo_set_source_rgb(2bdc80def475f266). (cr, OFFWHITEcxx . . $ `engines/crux/src/crux-draw.c:493:10`!); |
| 517 | cairo_fill_preservecxx . . $ cairo_fill_preserve(21788b7825b29bf). (cr); |
| 518 | |
| 519 | ge_cairo_set_colorcxx . . $ ge_cairo_set_color(4f73748928299b29). (cr, &outline); |
| 520 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 521 | |
| 522 | |
| 523 | if (orientation == GTK_ORIENTATION_HORIZONTALcxx . . $ GTK_ORIENTATION_HORIZONTAL.) |
| 524 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x, y + height / 2 + 1, width, height / 2 -1); |
| 525 | else |
| 526 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x + width / 2 + 1, y, width / 2 - 1, height); |
| 527 | |
| 528 | cairo_set_source_rgbcxx . . $ cairo_set_source_rgb(2bdc80def475f266). (cr, OFFWHITEcxx . . $ `engines/crux/src/crux-draw.c:493:10`!); |
| 529 | cairo_fill_preservecxx . . $ cairo_fill_preserve(21788b7825b29bf). (cr); |
| 530 | |
| 531 | ge_cairo_set_colorcxx . . $ ge_cairo_set_color(4f73748928299b29). (cr, &outline); |
| 532 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 533 | |
| 534 | if (orientation == GTK_ORIENTATION_HORIZONTALcxx . . $ GTK_ORIENTATION_HORIZONTAL.) |
| 535 | { |
| 536 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x + width, y); |
| 537 | gradient_size = 24 / width; |
| 538 | } |
| 539 | else |
| 540 | { |
| 541 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x, y + height); |
| 542 | gradient_size = 24 / height; |
| 543 | } |
| 544 | |
| 545 | |
| 546 | /* set co-ordinates for fill drawing */ |
| 547 | x -= 0.5; y -= 0.5; width += 1.0; height += 1.0; |
| 548 | |
| 549 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x, y, width, height); |
| 550 | cairo_pattern_add_color_stop_rgbacxx . . $ cairo_pattern_add_color_stop_rgba(52caebadf4264343). (crp, 0.0, 0.0, 0.0, 0.0, 0.5); |
| 551 | cairo_pattern_add_color_stop_rgbacxx . . $ cairo_pattern_add_color_stop_rgba(52caebadf4264343). (crp, gradient_size, 0.0, 0.0, 0.0, 0.0); |
| 552 | cairo_pattern_add_color_stop_rgbacxx . . $ cairo_pattern_add_color_stop_rgba(52caebadf4264343). (crp, 1.0 - gradient_size, 0.0, 0.0, 0.0, 0.0); |
| 553 | cairo_pattern_add_color_stop_rgbacxx . . $ cairo_pattern_add_color_stop_rgba(52caebadf4264343). (crp, 1.0, 0.0, 0.0, 0.0, 0.5); |
| 554 | |
| 555 | cairo_set_sourcecxx . . $ cairo_set_source(dab881992d64b89). (cr, crp); |
| 556 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 557 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (crp); |
| 558 | } |
| 559 | |
| 560 | static void |
| 561 | paint_scale_troughcxx . . $ paint_scale_trough(6e274d505e2dabf5). (cairo_tcxx . . $ cairo_t# *cr, GtkStylecxx . . $ GtkStyle# *style, GtkStateTypecxx . . $ GtkStateType# state_type, GtkOrientationcxx . . $ GtkOrientation# orientation, |
| 562 | gdoublecxx . . $ gdouble# x, gdoublecxx . . $ gdouble# y, gdoublecxx . . $ gdouble# width, gdoublecxx . . $ gdouble# height) |
| 563 | { |
| 564 | CairoColorcxx . . $ CairoColor# c1, c2, bg, outline; |
| 565 | cairo_pattern_tcxx . . $ cairo_pattern_t# *crp; |
| 566 | gdoublecxx . . $ gdouble# radius = 2.0; |
| 567 | |
| 568 | /* set up colours */ |
| 569 | /* calculate start and end colours for the gradient */ |
| 570 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[GTK_STATE_NORMALcxx . . $ GTK_STATE_NORMAL.], &bg); |
| 571 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&bg, 0.7, &c2); /* darken */ |
| 572 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&bg, 1.1, &c1); /* lighten */ |
| 573 | /* outline colour */ |
| 574 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&bg, OUTLINE_SHADEcxx . . $ `engines/crux/src/crux-draw.c:14:9`!, &outline); |
| 575 | |
| 576 | |
| 577 | |
| 578 | /* set co-ordinates for line drawing */ |
| 579 | x += 0.5; y += 0.5; width -= 1.0; height -= 1.0; |
| 580 | |
| 581 | |
| 582 | if (orientation == GTK_ORIENTATION_VERTICALcxx . . $ GTK_ORIENTATION_VERTICAL.) |
| 583 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x + 2.0, y, x + width - 2.0, y); |
| 584 | else |
| 585 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y+2.0, x, y+height-2.0); |
| 586 | |
| 587 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, x, y, width, height, radius, CR_CORNER_ALLcxx . . $ CR_CORNER_ALL.); |
| 588 | |
| 589 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.0, c1.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c1.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c1.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 590 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 1.0, c2.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c2.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c2.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 591 | |
| 592 | cairo_set_sourcecxx . . $ cairo_set_source(dab881992d64b89). (cr, crp); |
| 593 | cairo_fill_preservecxx . . $ cairo_fill_preserve(21788b7825b29bf). (cr); |
| 594 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (crp); |
| 595 | |
| 596 | /* dark gray */ |
| 597 | |
| 598 | ge_cairo_set_colorcxx . . $ ge_cairo_set_color(4f73748928299b29). (cr, &outline); |
| 599 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 600 | |
| 601 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, x+1.0, y+1.0, width-2.0, height-2.0, radius, CR_CORNER_ALLcxx . . $ CR_CORNER_ALL.); |
| 602 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x, y + height); |
| 603 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.0, 1.0, 1.0, 1.0); |
| 604 | cairo_pattern_add_color_stop_rgbacxx . . $ cairo_pattern_add_color_stop_rgba(52caebadf4264343). (crp, 1.0, 1.0, 1.0, 1.0, 100/255.0); |
| 605 | cairo_set_sourcecxx . . $ cairo_set_source(dab881992d64b89). (cr, crp); |
| 606 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 607 | |
| 608 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[GTK_STATE_NORMALcxx . . $ GTK_STATE_NORMAL.], &c2); |
| 609 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&c2, 0.8, &c2); /* darken */ |
| 610 | cairo_set_source_rgbcxx . . $ cairo_set_source_rgb(2bdc80def475f266). (cr, c2.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c2.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c2.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 611 | if (orientation == GTK_ORIENTATION_VERTICALcxx . . $ GTK_ORIENTATION_VERTICAL.) |
| 612 | { |
| 613 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x + width + 1.0, y + radius); |
| 614 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width + 1.0, y + height - radius); |
| 615 | } |
| 616 | else |
| 617 | { |
| 618 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x + radius, y + height + 1.0); |
| 619 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width - radius, y + height + 1.0); |
| 620 | } |
| 621 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 622 | |
| 623 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (crp); |
| 624 | |
| 625 | } |
| 626 | |
| 627 | static void |
| 628 | paint_progress_barcxx . . $ paint_progress_bar(3c1f892b8d71665d). (cairo_tcxx . . $ cairo_t# *cr, GtkStylecxx . . $ GtkStyle# *style, GtkStateTypecxx . . $ GtkStateType# state_type, GtkProgressBarOrientationcxx . . $ GtkProgressBarOrientation# orientation, |
| 629 | gdoublecxx . . $ gdouble# x, gdoublecxx . . $ gdouble# y, gdoublecxx . . $ gdouble# width, gdoublecxx . . $ gdouble# height, gdoublecxx . . $ gdouble# fraction, CairoColorcxx . . $ CairoColor# *base_color) |
| 630 | { |
| 631 | cairo_pattern_tcxx . . $ cairo_pattern_t# *crp; |
| 632 | CairoColorcxx . . $ CairoColor# c1, c2; |
| 633 | |
| 634 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x, y, width, height); |
| 635 | |
| 636 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->basecxx . . $ _GtkStyle#base.[GTK_STATE_SELECTEDcxx . . $ GTK_STATE_SELECTED.], &c1); |
| 637 | CRUX_DARKcxx . . $ `engines/crux/src/crux-draw.c:17:9`!(*base_color, c2); |
| 638 | CRUX_LIGHTcxx . . $ `engines/crux/src/crux-draw.c:16:9`!(*base_color, c1); |
| 639 | if (orientation == GTK_PROGRESS_LEFT_TO_RIGHTcxx . . $ GTK_PROGRESS_LEFT_TO_RIGHT. || orientation == GTK_PROGRESS_RIGHT_TO_LEFTcxx . . $ GTK_PROGRESS_RIGHT_TO_LEFT.) |
| 640 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x, y + height); |
| 641 | else |
| 642 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x + width, y); |
| 643 | |
| 644 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.0, c1.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c1.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c1.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 645 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 1.0, c2.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c2.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c2.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 646 | |
| 647 | cairo_set_sourcecxx . . $ cairo_set_source(dab881992d64b89). (cr, crp); |
| 648 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 649 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (crp); |
| 650 | |
| 651 | /* set co-ordinates for line drawing */ |
| 652 | x += 0.5; y += 0.5; width -= 1.0; height -= 1.0; |
| 653 | |
| 654 | if (fraction < 1.0) |
| 655 | { |
| 656 | switch (orientation) |
| 657 | { |
| 658 | case GTK_PROGRESS_LEFT_TO_RIGHTcxx . . $ GTK_PROGRESS_LEFT_TO_RIGHT.: width--; break; |
| 659 | case GTK_PROGRESS_RIGHT_TO_LEFTcxx . . $ GTK_PROGRESS_RIGHT_TO_LEFT.: x++; width--; break; |
| 660 | case GTK_PROGRESS_TOP_TO_BOTTOMcxx . . $ GTK_PROGRESS_TOP_TO_BOTTOM.: height--; break; |
| 661 | case GTK_PROGRESS_BOTTOM_TO_TOPcxx . . $ GTK_PROGRESS_BOTTOM_TO_TOP.: y++; height--; break; |
| 662 | } |
| 663 | } |
| 664 | |
| 665 | |
| 666 | |
| 667 | /* bevel */ |
| 668 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x, y, width, height); |
| 669 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x, y + height); |
| 670 | cairo_pattern_add_color_stop_rgbacxx . . $ cairo_pattern_add_color_stop_rgba(52caebadf4264343). (crp, 0.0, 1.0, 1.0, 1.0, .3); |
| 671 | cairo_pattern_add_color_stop_rgbacxx . . $ cairo_pattern_add_color_stop_rgba(52caebadf4264343). (crp, 1.0, 1.0, 1.0, 1.0, 0.1); |
| 672 | cairo_set_sourcecxx . . $ cairo_set_source(dab881992d64b89). (cr, crp); |
| 673 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 674 | |
| 675 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (crp); |
| 676 | |
| 677 | |
| 678 | /* end cap */ |
| 679 | |
| 680 | if (fraction < 1.0) |
| 681 | { |
| 682 | cairo_set_source_rgbcxx . . $ cairo_set_source_rgb(2bdc80def475f266). (cr, c2.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c2.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c2.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 683 | switch (orientation) |
| 684 | { |
| 685 | case GTK_PROGRESS_LEFT_TO_RIGHTcxx . . $ GTK_PROGRESS_LEFT_TO_RIGHT.: |
| 686 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x + width + 1.0, y); |
| 687 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width + 1.0, y + height); |
| 688 | break; |
| 689 | case GTK_PROGRESS_RIGHT_TO_LEFTcxx . . $ GTK_PROGRESS_RIGHT_TO_LEFT.: |
| 690 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x - 1.0, y); |
| 691 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x - 1.0, y + height); |
| 692 | break; |
| 693 | case GTK_PROGRESS_TOP_TO_BOTTOMcxx . . $ GTK_PROGRESS_TOP_TO_BOTTOM.: |
| 694 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x, y + height + 1.0); |
| 695 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width, y + height + 1.0); |
| 696 | break; |
| 697 | case GTK_PROGRESS_BOTTOM_TO_TOPcxx . . $ GTK_PROGRESS_BOTTOM_TO_TOP.: |
| 698 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x, y - 1.0); |
| 699 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width, y - 1.0); |
| 700 | break; |
| 701 | } |
| 702 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 703 | } |
| 704 | |
| 705 | |
| 706 | /* draw the end cap shadow |
| 707 | * TODO: create shadows for all progress bars (currently only works for left to right) |
| 708 | * |
| 709 | * three lines of alpha: 0.22, 0.12, 0.03 |
| 710 | * TODO: this doesn't work quite right, as the top part of the shadow |
| 711 | * is already drawn by draw_box (), so the corner looks too dark |
| 712 | */ |
| 713 | |
| 714 | if (orientation == GTK_PROGRESS_LEFT_TO_RIGHTcxx . . $ GTK_PROGRESS_LEFT_TO_RIGHT.) |
| 715 | { |
| 716 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0, 0, 0, .22); |
| 717 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x + width + 2.0, y); |
| 718 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width + 2.0, y + height); |
| 719 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 720 | |
| 721 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0, 0, 0, .12); |
| 722 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x + width + 3.0, y); |
| 723 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width + 3.0, y + height); |
| 724 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 725 | |
| 726 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0, 0, 0, .03); |
| 727 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x + width + 4.0, y); |
| 728 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width + 4.0, y + height); |
| 729 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 730 | } |
| 731 | } |
| 732 | |
| 733 | /* style functions */ |
| 734 | |
| 735 | static void |
| 736 | draw_hlinecxx . . $ draw_hline(8560bb68e408b10a). (GtkStylecxx . . $ GtkStyle# *style, |
| 737 | GdkWindowcxx . . $ GdkWindow# *window, |
| 738 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 739 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 740 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 741 | const gcharcxx . . $ gchar# *detail, |
| 742 | gintcxx . . $ gint# x1, gintcxx . . $ gint# x2, gintcxx . . $ gint# y) |
| 743 | { |
| 744 | CairoColorcxx . . $ CairoColor# base, light, dark; |
| 745 | cairo_tcxx . . $ cairo_t# *cr; |
| 746 | |
| 747 | CHECK_ARGScxx . . $ `engines/support/general-support.h:38:9`! |
| 748 | |
| 749 | debugcxx . . $ debug(326aeb464d16410c). ("draw_hline: detail=%s state=%d x1=%d x2=%d y=%d\n", |
| 750 | detail, state_type, x1, x2, y); |
| 751 | |
| 752 | cr = ge_gdk_drawable_to_cairocxx . . $ ge_gdk_drawable_to_cairo(9aef5f42f17cdc6). (window, area); |
| 753 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[state_type], &base); |
| 754 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&base, 0.88, &dark); |
| 755 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&base, 1.12, &light); |
| 756 | ge_cairo_set_colorcxx . . $ ge_cairo_set_color(4f73748928299b29). (cr, &dark); |
| 757 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x1 + 0.5, y + 0.5); |
| 758 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x2 + 0.5, y + 0.5); |
| 759 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 760 | y++; |
| 761 | ge_cairo_set_colorcxx . . $ ge_cairo_set_color(4f73748928299b29). (cr, &light); |
| 762 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x1 + 0.5, y + 0.5); |
| 763 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x2 + 0.5, y + 0.5); |
| 764 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 765 | cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr); |
| 766 | } |
| 767 | |
| 768 | static void |
| 769 | draw_vlinecxx . . $ draw_vline(8560bb68e408b10a). (GtkStylecxx . . $ GtkStyle# *style, |
| 770 | GdkWindowcxx . . $ GdkWindow# *window, |
| 771 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 772 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 773 | GtkWidgetcxx . . $ GtkWidget# *widget, const gcharcxx . . $ gchar# *detail, gintcxx . . $ gint# y1, gintcxx . . $ gint# y2, gintcxx . . $ gint# x) |
| 774 | { |
| 775 | CairoColorcxx . . $ CairoColor# base, light, dark; |
| 776 | cairo_tcxx . . $ cairo_t# *cr; |
| 777 | |
| 778 | CHECK_ARGScxx . . $ `engines/support/general-support.h:38:9`! |
| 779 | |
| 780 | debugcxx . . $ debug(326aeb464d16410c). ("draw_vline: detail=%s state=%d x=%d y1=%d y2=%d\n", |
| 781 | detail, state_type, x, y1, y2); |
| 782 | |
| 783 | cr = ge_gdk_drawable_to_cairocxx . . $ ge_gdk_drawable_to_cairo(9aef5f42f17cdc6). (window, area); |
| 784 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[state_type], &base); |
| 785 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&base, 0.88, &dark); |
| 786 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&base, 1.12, &light); |
| 787 | ge_cairo_set_colorcxx . . $ ge_cairo_set_color(4f73748928299b29). (cr, &dark); |
| 788 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x + 0.5, y1 + 0.5); |
| 789 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + 0.5, y2 + 0.5); |
| 790 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 791 | x++; |
| 792 | ge_cairo_set_colorcxx . . $ ge_cairo_set_color(4f73748928299b29). (cr, &light); |
| 793 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x + 0.5, y1 + 0.5); |
| 794 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + 0.5, y2 + 0.5); |
| 795 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 796 | cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr); |
| 797 | } |
| 798 | |
| 799 | static void |
| 800 | draw_shadowcxx . . $ draw_shadow(735e120c49b17d11). (GtkStylecxx . . $ GtkStyle# *style, |
| 801 | GdkWindowcxx . . $ GdkWindow# *window, |
| 802 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 803 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 804 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 805 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 806 | const gcharcxx . . $ gchar# *detail, gintcxx . . $ gint# x, gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height) |
| 807 | { |
| 808 | cairo_tcxx . . $ cairo_t# *cr; |
| 809 | GdkRectanglecxx . . $ GdkRectangle# area2; |
| 810 | gbooleancxx . . $ gboolean# focused = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 811 | |
| 812 | CHECK_ARGScxx . . $ `engines/support/general-support.h:38:9`! |
| 813 | SANITIZE_SIZEcxx . . $ `engines/support/general-support.h:42:9`! |
| 814 | |
| 815 | area2.xcxx . . $ _GdkRectangle#x. = x; |
| 816 | area2.ycxx . . $ _GdkRectangle#y. = y; |
| 817 | area2.widthcxx . . $ _GdkRectangle#width. = width; |
| 818 | area2.heightcxx . . $ _GdkRectangle#height. = height; |
| 819 | |
| 820 | if (widget != 0 && !GTK_WIDGET_IS_SENSITIVEcxx . . $ `<external>/2077894753000033433/gtkwidget.h:312:9`! (widget)) |
| 821 | state_type = GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.; |
| 822 | |
| 823 | debugcxx . . $ debug(326aeb464d16410c). ("draw_shadow: detail=%s state=%d shadow=%d x=%d y=%d w=%d h=%d\n", |
| 824 | detail, state_type, shadow_type, x, y, width, height); |
| 825 | |
| 826 | if (widget != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && GTK_WIDGET_HAS_FOCUScxx . . $ `<external>/2077894753000033433/gtkwidget.h:338:9`! (widget)) |
| 827 | focused = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 828 | |
| 829 | if (widget && (GE_IS_COMBOcxx . . $ `engines/support/widget-information.h:84:9`! (widget->parent) || GE_IS_COMBO_BOX_ENTRYcxx . . $ `engines/support/widget-information.h:82:9`! (widget->parent))) |
| 830 | { |
| 831 | GtkWidgetcxx . . $ GtkWidget# *button; |
| 832 | if (ge_widget_is_ltrcxx . . $ ge_widget_is_ltr(9247ef2dc26c5426). (widget)) |
| 833 | width += 2; |
| 834 | else |
| 835 | { |
| 836 | x -= 3; |
| 837 | width += 3; |
| 838 | } |
| 839 | |
| 840 | if (area == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 841 | area = &area2; |
| 842 | g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). ((GObjectcxx . . $ GObject#*) widget->parentcxx . . $ _GtkWidget#parent., "entry", widget); |
| 843 | button = g_object_get_datacxx . . $ g_object_get_data(973400aee2f864c2). ((GObjectcxx . . $ GObject#*) widget->parentcxx . . $ _GtkWidget#parent., "button"); |
| 844 | if (GE_IS_WIDGETcxx . . $ `engines/support/widget-information.h:63:9`! (button)) |
| 845 | gtk_widget_queue_draw_areacxx . . $ gtk_widget_queue_draw_area(7ed79238e7a74dd9). (button, button->allocationcxx . . $ _GtkWidget#allocation..xcxx . . $ _GdkRectangle#x., button->allocationcxx . . $ _GtkWidget#allocation..ycxx . . $ _GdkRectangle#y., button->allocationcxx . . $ _GtkWidget#allocation..widthcxx . . $ _GdkRectangle#width.,button->allocationcxx . . $ _GtkWidget#allocation..heightcxx . . $ _GdkRectangle#height.); |
| 846 | } |
| 847 | |
| 848 | if (widget && GTK_IS_SPIN_BUTTONcxx . . $ `<external>/8316996749403149042/gtkspinbutton.h:47:9`! (widget)) |
| 849 | { |
| 850 | if (ge_widget_is_ltrcxx . . $ ge_widget_is_ltr(9247ef2dc26c5426). (widget)) |
| 851 | width += 2; |
| 852 | else |
| 853 | { |
| 854 | x -= 3; |
| 855 | width += 3; |
| 856 | } |
| 857 | |
| 858 | if (area == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 859 | area = &area2; |
| 860 | } |
| 861 | |
| 862 | cr = ge_gdk_drawable_to_cairocxx . . $ ge_gdk_drawable_to_cairo(9aef5f42f17cdc6). (window, area); |
| 863 | |
| 864 | if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("entry")) |
| 865 | paint_entry_shadowcxx . . $ paint_entry_shadow(463ae507175eae42). (cr, style, state_type, focused, x, y, width, height); |
| 866 | else |
| 867 | paint_shadowcxx . . $ paint_shadow(6bbf0d165219276c). (cr, style, state_type, shadow_type, x, y, width, height); |
| 868 | cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr); |
| 869 | } |
| 870 | |
| 871 | static void |
| 872 | draw_boxcxx . . $ draw_box(735e120c49b17d11). (GtkStylecxx . . $ GtkStyle# *style, |
| 873 | GdkWindowcxx . . $ GdkWindow# *window, |
| 874 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 875 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 876 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 877 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 878 | const gcharcxx . . $ gchar# *detail, gintcxx . . $ gint# x, gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height) |
| 879 | { |
| 880 | |
| 881 | cairo_tcxx . . $ cairo_t# *cr; |
| 882 | gdoublecxx . . $ gdouble# cx, cy, cw, ch; |
| 883 | |
| 884 | CHECK_ARGScxx . . $ `engines/support/general-support.h:38:9`! |
| 885 | SANITIZE_SIZEcxx . . $ `engines/support/general-support.h:42:9`! |
| 886 | |
| 887 | debugcxx . . $ debug(326aeb464d16410c). ("draw_box: detail=%s state=%d shadow=%d x=%d y=%d w=%d h=%d\n", |
| 888 | detail, state_type, shadow_type, x, y, width, height); |
| 889 | |
| 890 | cr = ge_gdk_drawable_to_cairocxx . . $ ge_gdk_drawable_to_cairo(9aef5f42f17cdc6). (window, area); |
| 891 | |
| 892 | if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("spinbutton")) |
| 893 | { |
| 894 | gbooleancxx . . $ gboolean# focused = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 895 | if (widget) { |
| 896 | state_type = GTK_WIDGET_STATEcxx . . $ `<external>/2077894753000033433/gtkwidget.h:166:9`! (widget); |
| 897 | focused = GTK_WIDGET_HAS_FOCUScxx . . $ `<external>/2077894753000033433/gtkwidget.h:338:9`! (widget); |
| 898 | } |
| 899 | width += 3; |
| 900 | if (ge_widget_is_ltrcxx . . $ ge_widget_is_ltr(9247ef2dc26c5426). (widget)) |
| 901 | x -= 3; |
| 902 | |
| 903 | paint_entry_shadowcxx . . $ paint_entry_shadow(463ae507175eae42). (cr, style, state_type, focused, x, y, width, height); |
| 904 | |
| 905 | cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr); |
| 906 | return; |
| 907 | } |
| 908 | |
| 909 | /* no pressed state for scollbar buttons yet... */ |
| 910 | if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("vscrollbar") || DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("hscrollbar")) |
| 911 | shadow_type = GTK_SHADOW_OUTcxx . . $ GTK_SHADOW_OUT.; |
| 912 | |
| 913 | if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("button") || DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("optionmenu") || DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("spinbutton_down") || DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("spinbutton_up")) |
| 914 | { |
| 915 | gbooleancxx . . $ gboolean# extra_shadow = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 916 | gbooleancxx . . $ gboolean# focused = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 917 | |
| 918 | if (widget) |
| 919 | focused = GTK_WIDGET_HAS_FOCUScxx . . $ `<external>/2077894753000033433/gtkwidget.h:338:9`! (widget); |
| 920 | |
| 921 | if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("spinbutton_down") || DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("spinbutton_up")) |
| 922 | { |
| 923 | /* add some padding */ |
| 924 | width -= 3; |
| 925 | if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("spinbutton_up")) |
| 926 | { |
| 927 | y += 3; |
| 928 | height -= 3; |
| 929 | } |
| 930 | else |
| 931 | { |
| 932 | y += 1; |
| 933 | height -= 4; |
| 934 | } |
| 935 | if (!ge_widget_is_ltrcxx . . $ ge_widget_is_ltr(9247ef2dc26c5426). (widget)) |
| 936 | x += 3; |
| 937 | extra_shadow = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 938 | } |
| 939 | |
| 940 | if (widget && (GE_IS_COMBOcxx . . $ `engines/support/widget-information.h:84:9`! (widget->parent) || GE_IS_COMBO_BOX_ENTRYcxx . . $ `engines/support/widget-information.h:82:9`! (widget->parent))) |
| 941 | { |
| 942 | /* Combobox buttons */ |
| 943 | GtkWidgetcxx . . $ GtkWidget# *entry; |
| 944 | gbooleancxx . . $ gboolean# entry_focused = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 945 | |
| 946 | if ((entry = g_object_get_datacxx . . $ g_object_get_data(973400aee2f864c2). ((GObjectcxx . . $ GObject#*) widget->parentcxx . . $ _GtkWidget#parent., "entry"))) |
| 947 | { |
| 948 | entry_focused = (GTK_WIDGET_HAS_FOCUScxx . . $ `<external>/2077894753000033433/gtkwidget.h:338:9`! (entry)); |
| 949 | state_type = GTK_WIDGET_STATEcxx . . $ `<external>/2077894753000033433/gtkwidget.h:166:9`! (entry); |
| 950 | } |
| 951 | |
| 952 | if (state_type == GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.) |
| 953 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->basecxx . . $ _GtkStyle#base.[GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.]); |
| 954 | else |
| 955 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->basecxx . . $ _GtkStyle#base.[GTK_STATE_NORMALcxx . . $ GTK_STATE_NORMAL.]); |
| 956 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x, y, width, height); |
| 957 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 958 | |
| 959 | g_object_set_datacxx . . $ g_object_set_data(c3d5001d890c27fc). ((GObjectcxx . . $ GObject#*) widget->parentcxx . . $ _GtkWidget#parent., "button", widget); |
| 960 | |
| 961 | if (ge_widget_is_ltrcxx . . $ ge_widget_is_ltr(9247ef2dc26c5426). (widget)) |
| 962 | paint_entry_shadowcxx . . $ paint_entry_shadow(463ae507175eae42). (cr, style, state_type, entry_focused, x - 4, y, width + 4, height); |
| 963 | else |
| 964 | paint_entry_shadowcxx . . $ paint_entry_shadow(463ae507175eae42). (cr, style, state_type, entry_focused, x, y, width + 4, height); |
| 965 | |
| 966 | x += 3; y += 3; |
| 967 | width -= 6; height -= 6; |
| 968 | extra_shadow = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 969 | } |
| 970 | if (widget && (GE_IS_TREE_VIEWcxx . . $ `engines/support/widget-information.h:120:9`! (widget->parent))) |
| 971 | { |
| 972 | /* Add some extra padding for treeview column buttons */ |
| 973 | if (state_type == GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.) |
| 974 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->basecxx . . $ _GtkStyle#base.[GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.]); |
| 975 | else |
| 976 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->basecxx . . $ _GtkStyle#base.[GTK_STATE_NORMALcxx . . $ GTK_STATE_NORMAL.]); |
| 977 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x, y, width, height); |
| 978 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 979 | |
| 980 | x += 1; y += 1; |
| 981 | width -= 2; height -= 2; |
| 982 | extra_shadow = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 983 | } |
| 984 | paint_buttoncxx . . $ paint_button(715eb20d123bea91). (cr, style, state_type, shadow_type, focused, extra_shadow, x, y, width, height); |
| 985 | } |
| 986 | else if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("buttondefault")) |
| 987 | { |
| 988 | /* draw Default Button marking, but only when sensitive */ |
| 989 | if (state_type != GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.) |
| 990 | { |
| 991 | CairoColorcxx . . $ CairoColor# c; |
| 992 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[GTK_STATE_SELECTEDcxx . . $ GTK_STATE_SELECTED.], &c); |
| 993 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, c.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b., 0.6); |
| 994 | |
| 995 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, x, y, width, height, 3.0, CR_CORNER_ALLcxx . . $ CR_CORNER_ALL.); |
| 996 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 997 | } |
| 998 | } |
| 999 | else if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("menuitem")) |
| 1000 | paint_menuitemcxx . . $ paint_menuitem(6c4a6ca02cbd6a2c). (cr, style, state_type, x, y, width, height); |
| 1001 | else if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("menu")) |
| 1002 | { |
| 1003 | |
| 1004 | cx = x + 0.5; cy = y + 0.5; cw = width - 1.0; ch = height - 1.0; |
| 1005 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, cx, cy, cw, ch); |
| 1006 | cairo_set_source_rgbcxx . . $ cairo_set_source_rgb(2bdc80def475f266). (cr, 54/255.0, 52/255.0, 54/255.0); |
| 1007 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1008 | |
| 1009 | cx++; cy++; cw -= 2.0; ch -= 2.0; |
| 1010 | |
| 1011 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->lightcxx . . $ _GtkStyle#light.[state_type]); |
| 1012 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, cx, cy + ch); |
| 1013 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, cx, cy); |
| 1014 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, cx + cw, cy); |
| 1015 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1016 | |
| 1017 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->darkcxx . . $ _GtkStyle#dark.[state_type]); |
| 1018 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, cx + cw, cy); |
| 1019 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, cx + cw, cy + ch); |
| 1020 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, cx, cy + ch); |
| 1021 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1022 | } |
| 1023 | else if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("bar") || DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("entry-progress")) |
| 1024 | { |
| 1025 | GtkProgressBarOrientationcxx . . $ GtkProgressBarOrientation# orientation; |
| 1026 | CairoColorcxx . . $ CairoColor# base_color; |
| 1027 | gdoublecxx . . $ gdouble# fraction = 0; |
| 1028 | if (widget && GE_IS_PROGRESS_BARcxx . . $ `engines/support/widget-information.h:92:9`! (widget)) |
| 1029 | { |
| 1030 | orientation = gtk_progress_bar_get_orientationcxx . . $ gtk_progress_bar_get_orientation(636c5db95d262e36). (GTK_PROGRESS_BARcxx . . $ `<external>/15989652121787244044/gtkprogressbar.h:41:9`! (widget)); |
| 1031 | fraction = gtk_progress_bar_get_fractioncxx . . $ gtk_progress_bar_get_fraction(d52113b449e3b12f). (GTK_PROGRESS_BARcxx . . $ `<external>/15989652121787244044/gtkprogressbar.h:41:9`! (widget)); |
| 1032 | } |
| 1033 | else |
| 1034 | orientation = GTK_PROGRESS_LEFT_TO_RIGHTcxx . . $ GTK_PROGRESS_LEFT_TO_RIGHT.; |
| 1035 | |
| 1036 | if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("bar")) |
| 1037 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->basecxx . . $ _GtkStyle#base.[GTK_STATE_SELECTEDcxx . . $ GTK_STATE_SELECTED.], &base_color); |
| 1038 | else |
| 1039 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[state_type], &base_color); |
| 1040 | |
| 1041 | paint_progress_barcxx . . $ paint_progress_bar(3c1f892b8d71665d). (cr, style, state_type, orientation, x, y, width, height, fraction, &base_color); |
| 1042 | } |
| 1043 | else if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("trough") && GE_IS_SCALEcxx . . $ `engines/support/widget-information.h:107:9`! (widget)) |
| 1044 | { |
| 1045 | GtkOrientationcxx . . $ GtkOrientation# orientation; |
| 1046 | if (GE_IS_VSCALEcxx . . $ `engines/support/widget-information.h:108:9`! (widget)) |
| 1047 | { |
| 1048 | x += 1; width -= 2; |
| 1049 | orientation = GTK_ORIENTATION_VERTICALcxx . . $ GTK_ORIENTATION_VERTICAL.; |
| 1050 | } |
| 1051 | else |
| 1052 | { |
| 1053 | y += 1; height -= 2; |
| 1054 | orientation = GTK_ORIENTATION_HORIZONTALcxx . . $ GTK_ORIENTATION_HORIZONTAL.; |
| 1055 | } |
| 1056 | paint_scale_troughcxx . . $ paint_scale_trough(6e274d505e2dabf5). (cr, style, state_type, orientation, x, y, width, height); |
| 1057 | } |
| 1058 | else if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("trough") && GE_IS_SCROLLBARcxx . . $ `engines/support/widget-information.h:103:9`! (widget)) |
| 1059 | { |
| 1060 | if (GE_IS_HSCROLLBARcxx . . $ `engines/support/widget-information.h:105:9`! (widget)) |
| 1061 | paint_scrollbar_troughcxx . . $ paint_scrollbar_trough(6e274d505e2dabf5). (cr, style, state_type, GTK_ORIENTATION_HORIZONTALcxx . . $ GTK_ORIENTATION_HORIZONTAL., x, y, width, height); |
| 1062 | else |
| 1063 | paint_scrollbar_troughcxx . . $ paint_scrollbar_trough(6e274d505e2dabf5). (cr, style, state_type, GTK_ORIENTATION_VERTICALcxx . . $ GTK_ORIENTATION_VERTICAL., x, y, width, height); |
| 1064 | } |
| 1065 | else |
| 1066 | { |
| 1067 | /* fill */ |
| 1068 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x, y, width, height); |
| 1069 | |
| 1070 | if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("toolbar") || DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("menubar") |
| 1071 | || DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("vscrollbar") || DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("hscrollbar") |
| 1072 | || DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("handlebox_bin") || DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("dockitem")) |
| 1073 | { |
| 1074 | /* make the handle and child widget appear as one */ |
| 1075 | if (widget && widget->parentcxx . . $ _GtkWidget#parent. && GTK_IS_HANDLE_BOXcxx . . $ `<external>/4771384480958674787/gtkhandlebox.h:48:9`! (widget->parent)) |
| 1076 | { |
| 1077 | GtkPositionTypecxx . . $ GtkPositionType# position; |
| 1078 | position = gtk_handle_box_get_handle_positioncxx . . $ gtk_handle_box_get_handle_position(fdd58622a529e4a1). (GTK_HANDLE_BOXcxx . . $ `<external>/4771384480958674787/gtkhandlebox.h:46:9`! (widget->parent)); |
| 1079 | if (!ge_widget_is_ltrcxx . . $ ge_widget_is_ltr(9247ef2dc26c5426). (widget->parentcxx . . $ _GtkWidget#parent.)) |
| 1080 | { |
| 1081 | if (position == GTK_POS_TOPcxx . . $ GTK_POS_TOP.) position = GTK_POS_BOTTOMcxx . . $ GTK_POS_BOTTOM.; |
| 1082 | else if (position == GTK_POS_BOTTOMcxx . . $ GTK_POS_BOTTOM.) position = GTK_POS_TOPcxx . . $ GTK_POS_TOP.; |
| 1083 | else if (position == GTK_POS_LEFTcxx . . $ GTK_POS_LEFT.) position = GTK_POS_RIGHTcxx . . $ GTK_POS_RIGHT.; |
| 1084 | else if (position == GTK_POS_RIGHTcxx . . $ GTK_POS_RIGHT.) position = GTK_POS_LEFTcxx . . $ GTK_POS_LEFT.; |
| 1085 | } |
| 1086 | switch (position) |
| 1087 | { |
| 1088 | case GTK_POS_TOPcxx . . $ GTK_POS_TOP.: |
| 1089 | y -= 3; |
| 1090 | height += 3; |
| 1091 | break; |
| 1092 | case GTK_POS_BOTTOMcxx . . $ GTK_POS_BOTTOM.: |
| 1093 | height += 3; |
| 1094 | break; |
| 1095 | case GTK_POS_LEFTcxx . . $ GTK_POS_LEFT.: |
| 1096 | x -= 3; |
| 1097 | width += 3; |
| 1098 | break; |
| 1099 | case GTK_POS_RIGHTcxx . . $ GTK_POS_RIGHT.: |
| 1100 | width += 3; |
| 1101 | } |
| 1102 | } |
| 1103 | |
| 1104 | if (shadow_type == GTK_SHADOW_OUTcxx . . $ GTK_SHADOW_OUT. || shadow_type == GTK_SHADOW_ETCHED_OUTcxx . . $ GTK_SHADOW_ETCHED_OUT.) |
| 1105 | { |
| 1106 | cairo_pattern_tcxx . . $ cairo_pattern_t# *crp; |
| 1107 | CairoColorcxx . . $ CairoColor# c1, c2; |
| 1108 | gdoublecxx . . $ gdouble# shade_v = 0.1; |
| 1109 | GtkOrientationcxx . . $ GtkOrientation# gradient_orientation = GTK_ORIENTATION_HORIZONTALcxx . . $ GTK_ORIENTATION_HORIZONTAL.; |
| 1110 | |
| 1111 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[state_type], &c1); |
| 1112 | if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("vscrollbar") || DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("hscrollbar")) |
| 1113 | { |
| 1114 | shade_v = 0.3; |
| 1115 | if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("vscrollbar")) |
| 1116 | gradient_orientation = GTK_ORIENTATION_VERTICALcxx . . $ GTK_ORIENTATION_VERTICAL.; |
| 1117 | } |
| 1118 | if (gradient_orientation == GTK_ORIENTATION_HORIZONTALcxx . . $ GTK_ORIENTATION_HORIZONTAL.) |
| 1119 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x, y + height); |
| 1120 | else |
| 1121 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x + width, y); |
| 1122 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&c1, 1.0 - shade_v, &c2); |
| 1123 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&c1, 1.0 + shade_v, &c1); |
| 1124 | /* |
| 1125 | cairo_pattern_add_color_stop_rgb (crp, 0.0, 238/255.0, 238/255.0, 236/255.0); |
| 1126 | cairo_pattern_add_color_stop_rgb (crp, 1.0, 185/255.0, 189/255.0, 182/255.0); |
| 1127 | */ |
| 1128 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.0, c1.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c1.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c1.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 1129 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 1.0, c2.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c2.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c2.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 1130 | cairo_set_sourcecxx . . $ cairo_set_source(dab881992d64b89). (cr, crp); |
| 1131 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 1132 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (crp); |
| 1133 | } |
| 1134 | else if (shadow_type == GTK_SHADOW_INcxx . . $ GTK_SHADOW_IN. || shadow_type == GTK_SHADOW_ETCHED_INcxx . . $ GTK_SHADOW_ETCHED_IN.) |
| 1135 | { |
| 1136 | /* cairo_set_source_rgb (cr, 196/255.0, 198/255.0, 192/255.0); */ |
| 1137 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->bgcxx . . $ _GtkStyle#bg.[state_type]); |
| 1138 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 1139 | } |
| 1140 | } |
| 1141 | else |
| 1142 | { |
| 1143 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->bgcxx . . $ _GtkStyle#bg.[state_type]); |
| 1144 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 1145 | } |
| 1146 | |
| 1147 | if (GE_IS_PROGRESS_BARcxx . . $ `engines/support/widget-information.h:92:9`! (widget) && DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("trough")) |
| 1148 | { |
| 1149 | /* draw a shadow in progress bar troughs */ |
| 1150 | cx = x + 1.5; |
| 1151 | cy = y + 1.5; |
| 1152 | cw = width - 3.0; |
| 1153 | ch = height - 3.0; |
| 1154 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, cx + 1.0, cy+ ch - 1.0); |
| 1155 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, cx + 1.0, cy+ 1.0); |
| 1156 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, cx + cw - 1.0, cy+ 1.0); |
| 1157 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0.0, 0.0, 0.0, 0.22); |
| 1158 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1159 | |
| 1160 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, cx + 2.0, cy + ch - 1.0); |
| 1161 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, cx + 2.0, cy + 2.0); |
| 1162 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, cx + cw - 1.0, cy+ 2.0); |
| 1163 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, cx + cw - 1.0, cy+ ch - 1.0); |
| 1164 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0.0, 0.0, 0.0, 0.12); |
| 1165 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1166 | |
| 1167 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, cx + 3.0, cy + 3.0, cw - 5.0, ch - 4.0); |
| 1168 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0.0, 0.0, 0.0, 0.03); |
| 1169 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1170 | } |
| 1171 | |
| 1172 | paint_shadowcxx . . $ paint_shadow(6bbf0d165219276c). (cr, style, state_type, shadow_type, x, y, width, height); |
| 1173 | } |
| 1174 | |
| 1175 | cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr); |
| 1176 | |
| 1177 | } |
| 1178 | |
| 1179 | static void |
| 1180 | draw_arrowcxx . . $ draw_arrow(422be73dba64f040). (GtkStylecxx . . $ GtkStyle# *style, |
| 1181 | GdkWindowcxx . . $ GdkWindow# *window, |
| 1182 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 1183 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 1184 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 1185 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 1186 | const gcharcxx . . $ gchar# *detail, |
| 1187 | GtkArrowTypecxx . . $ GtkArrowType# arrow_type, |
| 1188 | gintcxx . . $ gint# fill, gintcxx . . $ gint# x, gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height) |
| 1189 | { |
| 1190 | cairo_tcxx . . $ cairo_t# *cr; |
| 1191 | |
| 1192 | CHECK_ARGScxx . . $ `engines/support/general-support.h:38:9`!; |
| 1193 | debugcxx . . $ debug(326aeb464d16410c). ("draw_arrow: detail=%s state=%d shadow=%d arrow_type=%d x=%d y=%d w=%d h=%d\n", |
| 1194 | detail, state_type, shadow_type, arrow_type, x, y, width, height); |
| 1195 | |
| 1196 | if (arrow_type == (GtkArrowTypecxx . . $ GtkArrowType#)4)/*NONE - new in GTK 2.10*/ |
| 1197 | return; |
| 1198 | |
| 1199 | |
| 1200 | /* random adjustments... */ |
| 1201 | if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("vscrollbar") || DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("hscrollbar")) |
| 1202 | { |
| 1203 | if (arrow_type == GTK_ARROW_DOWNcxx . . $ GTK_ARROW_DOWN.) |
| 1204 | y++; |
| 1205 | else if (arrow_type == GTK_ARROW_RIGHTcxx . . $ GTK_ARROW_RIGHT.) |
| 1206 | x++; |
| 1207 | } |
| 1208 | |
| 1209 | if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("spinbutton")) |
| 1210 | { |
| 1211 | if (ge_widget_is_ltrcxx . . $ ge_widget_is_ltr(9247ef2dc26c5426). (widget)) |
| 1212 | x--; |
| 1213 | else |
| 1214 | x += 1; |
| 1215 | if (arrow_type == GTK_ARROW_UPcxx . . $ GTK_ARROW_UP.) |
| 1216 | y++; |
| 1217 | } |
| 1218 | if (arrow_type == GTK_ARROW_UPcxx . . $ GTK_ARROW_UP. || arrow_type == GTK_ARROW_DOWNcxx . . $ GTK_ARROW_DOWN.) |
| 1219 | { |
| 1220 | x = x + width / 2 - 2; |
| 1221 | y = y + height / 2 - 2; |
| 1222 | height = 4; width = 5; |
| 1223 | } |
| 1224 | else if (arrow_type == GTK_ARROW_LEFTcxx . . $ GTK_ARROW_LEFT. || GTK_ARROW_RIGHTcxx . . $ GTK_ARROW_RIGHT.) |
| 1225 | { |
| 1226 | x = x + width / 2 - 2; |
| 1227 | y = y + height / 2 - 2; |
| 1228 | height = 5; width = 4; |
| 1229 | } |
| 1230 | |
| 1231 | |
| 1232 | |
| 1233 | cr = ge_gdk_drawable_to_cairocxx . . $ ge_gdk_drawable_to_cairo(9aef5f42f17cdc6). (window, area); |
| 1234 | switch (arrow_type) |
| 1235 | { |
| 1236 | case GTK_ARROW_UPcxx . . $ GTK_ARROW_UP.: |
| 1237 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x, y + height); |
| 1238 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width, y + height); |
| 1239 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + (width / 2.0), y); |
| 1240 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x, y + height); |
| 1241 | break; |
| 1242 | default: |
| 1243 | case GTK_ARROW_DOWNcxx . . $ GTK_ARROW_DOWN.: |
| 1244 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x, y); |
| 1245 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width, y); |
| 1246 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + (width / 2.0), y + height); |
| 1247 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x, y); |
| 1248 | break; |
| 1249 | case GTK_ARROW_LEFTcxx . . $ GTK_ARROW_LEFT.: |
| 1250 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x + width, y); |
| 1251 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x, y + (height / 2.0)); |
| 1252 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width, y + height); |
| 1253 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width, y); |
| 1254 | break; |
| 1255 | case GTK_ARROW_RIGHTcxx . . $ GTK_ARROW_RIGHT.: |
| 1256 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x, y); |
| 1257 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width, y + (height / 2.0)); |
| 1258 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x, y + height); |
| 1259 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x, y); |
| 1260 | break; |
| 1261 | } |
| 1262 | |
| 1263 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->fgcxx . . $ _GtkStyle#fg.[state_type]); |
| 1264 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 1265 | |
| 1266 | cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr); |
| 1267 | |
| 1268 | } |
| 1269 | |
| 1270 | static void |
| 1271 | draw_checkcxx . . $ draw_check(735e120c49b17d11). (GtkStylecxx . . $ GtkStyle# *style, |
| 1272 | GdkWindowcxx . . $ GdkWindow# *window, |
| 1273 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 1274 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 1275 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 1276 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 1277 | const gcharcxx . . $ gchar# *detail, gintcxx . . $ gint# x, gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height) |
| 1278 | { |
| 1279 | cairo_tcxx . . $ cairo_t# * cr; |
| 1280 | cairo_pattern_tcxx . . $ cairo_pattern_t# *crp; |
| 1281 | CairoColorcxx . . $ CairoColor# c1, bg, outline; |
| 1282 | gdoublecxx . . $ gdouble# cx, cy, cw, ch; /* co-ordinates for cairo */ |
| 1283 | |
| 1284 | CHECK_ARGScxx . . $ `engines/support/general-support.h:38:9`! |
| 1285 | SANITIZE_SIZEcxx . . $ `engines/support/general-support.h:42:9`! |
| 1286 | |
| 1287 | debugcxx . . $ debug(326aeb464d16410c). ("draw_check: detail=%s state=%d shadow=%d x=%d y=%d w=%d h=%d\n", |
| 1288 | detail, state_type, shadow_type, x, y, width, height); |
| 1289 | |
| 1290 | cr = ge_gdk_drawable_to_cairocxx . . $ ge_gdk_drawable_to_cairo(9aef5f42f17cdc6). (window, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1291 | |
| 1292 | /* set up colours */ |
| 1293 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[GTK_STATE_NORMALcxx . . $ GTK_STATE_NORMAL.], &bg); |
| 1294 | /* outline colour */ |
| 1295 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&bg, OUTLINE_SHADEcxx . . $ `engines/crux/src/crux-draw.c:14:9`!, &outline); |
| 1296 | |
| 1297 | |
| 1298 | /* set up for line drawing */ |
| 1299 | cx = x + 0.5; cy = y + 0.5; |
| 1300 | ch = height - 1.0; cw = width - 1.0; |
| 1301 | |
| 1302 | |
| 1303 | if (!GE_IS_MENU_ITEMcxx . . $ `engines/support/widget-information.h:97:9`! (widget)) |
| 1304 | { |
| 1305 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, cx, cy, cw, ch, 2.0, CR_CORNER_ALLcxx . . $ CR_CORNER_ALL.); |
| 1306 | if (state_type == GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.) |
| 1307 | { |
| 1308 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->bgcxx . . $ _GtkStyle#bg.[state_type]); |
| 1309 | cairo_fill_preservecxx . . $ cairo_fill_preserve(21788b7825b29bf). (cr); |
| 1310 | |
| 1311 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->fgcxx . . $ _GtkStyle#fg.[state_type]); |
| 1312 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1313 | |
| 1314 | /* prepare area for check mark */ |
| 1315 | cx+= 2.0; cy+= 2.0; cw -= 4.0; ch -= 4.0; |
| 1316 | } |
| 1317 | else |
| 1318 | { |
| 1319 | /* create gradient */ |
| 1320 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (cx, cy, cx, cy + ch); |
| 1321 | |
| 1322 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[GTK_STATE_NORMALcxx . . $ GTK_STATE_NORMAL.], &c1); |
| 1323 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&c1, 0.9, &c1); /* darken */ |
| 1324 | |
| 1325 | if (state_type == GTK_STATE_ACTIVEcxx . . $ GTK_STATE_ACTIVE.) |
| 1326 | { |
| 1327 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.0, c1.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c1.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c1.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 1328 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 1.0, 1.0, 1.0, 1.0); |
| 1329 | } |
| 1330 | else |
| 1331 | { |
| 1332 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.0, 1.0, 1.0, 1.0); |
| 1333 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 1.0, c1.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c1.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c1.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 1334 | } |
| 1335 | cairo_set_sourcecxx . . $ cairo_set_source(dab881992d64b89). (cr, crp); |
| 1336 | cairo_fill_preservecxx . . $ cairo_fill_preserve(21788b7825b29bf). (cr); |
| 1337 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (crp); |
| 1338 | |
| 1339 | ge_cairo_set_colorcxx . . $ ge_cairo_set_color(4f73748928299b29). (cr, &outline); |
| 1340 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1341 | |
| 1342 | /* inner hilight */ |
| 1343 | cx+=1.0; cy+=1.0; cw -= 2.0; ch -= 2.0; |
| 1344 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, cx, cy, cw, ch, 1.0, CR_CORNER_ALLcxx . . $ CR_CORNER_ALL.); |
| 1345 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 1.0, 1.0, 1.0, 0.7); |
| 1346 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1347 | |
| 1348 | /* prepare area for check mark */ |
| 1349 | cx+=1.0; cy+=1.0; cw -= 2.0; ch -= 2.0; |
| 1350 | } |
| 1351 | } |
| 1352 | if (shadow_type == GTK_SHADOW_INcxx . . $ GTK_SHADOW_IN.) |
| 1353 | { |
| 1354 | cairo_set_line_widthcxx . . $ cairo_set_line_width(74853563bcf87c34). (cr, 2.0); |
| 1355 | |
| 1356 | /* draw check mark shadow first */ |
| 1357 | if (state_type != GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.) |
| 1358 | { |
| 1359 | cy+=1.0; |
| 1360 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0.0, 0.0, 0.0, 0.3); |
| 1361 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, cx + floorcxx . . $ floor(447c67c6676f75c3).(cw / 4), cy + ch / 2); |
| 1362 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, cx + floorcxx . . $ floor(447c67c6676f75c3).(cw / 2), cy + floorcxx . . $ floor(447c67c6676f75c3).(ch * 0.75)); |
| 1363 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, cx + cw, cy + floorcxx . . $ floor(447c67c6676f75c3).(ch / 4)); |
| 1364 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1365 | cy-=1.0; |
| 1366 | } |
| 1367 | if (state_type == GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.) |
| 1368 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->fgcxx . . $ _GtkStyle#fg.[state_type]); |
| 1369 | else |
| 1370 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->bgcxx . . $ _GtkStyle#bg.[GTK_STATE_SELECTEDcxx . . $ GTK_STATE_SELECTED.]); |
| 1371 | |
| 1372 | /* draw check mark */ |
| 1373 | /* use floor() so that we still end up with a .5 value when adding to the co-ordinate! */ |
| 1374 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, cx + floorcxx . . $ floor(447c67c6676f75c3).(cw / 4), cy + ch / 2); |
| 1375 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, cx + floorcxx . . $ floor(447c67c6676f75c3).(cw / 2), cy + floorcxx . . $ floor(447c67c6676f75c3).(ch * 0.75)); |
| 1376 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, cx + cw, cy + floorcxx . . $ floor(447c67c6676f75c3).(ch / 4)); |
| 1377 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1378 | } |
| 1379 | else if (shadow_type != GTK_SHADOW_OUTcxx . . $ GTK_SHADOW_OUT.) |
| 1380 | { |
| 1381 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0.0, 0.0, 0.0, 0.3); |
| 1382 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x + width / 4, y + (height /3) + 0.5, width - (width / 2), height / 4); |
| 1383 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 1384 | |
| 1385 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->bgcxx . . $ _GtkStyle#bg.[GTK_STATE_SELECTEDcxx . . $ GTK_STATE_SELECTED.]); |
| 1386 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x + width / 4, y + (height /3), width - (width / 2), height / 4); |
| 1387 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 1388 | } |
| 1389 | |
| 1390 | cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr); |
| 1391 | } |
| 1392 | |
| 1393 | static void |
| 1394 | draw_optioncxx . . $ draw_option(735e120c49b17d11). (GtkStylecxx . . $ GtkStyle# *style, |
| 1395 | GdkWindowcxx . . $ GdkWindow# *window, |
| 1396 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 1397 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 1398 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 1399 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 1400 | const gcharcxx . . $ gchar# *detail, gintcxx . . $ gint# x, gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height) |
| 1401 | { |
| 1402 | cairo_tcxx . . $ cairo_t# *cr; |
| 1403 | cairo_pattern_tcxx . . $ cairo_pattern_t# *crp; |
| 1404 | gdoublecxx . . $ gdouble# cx, cy, radius; /* cairo co-ordinates */ |
| 1405 | CairoColorcxx . . $ CairoColor# c1, c2, bg, outline; |
| 1406 | |
| 1407 | CHECK_ARGScxx . . $ `engines/support/general-support.h:38:9`! |
| 1408 | SANITIZE_SIZEcxx . . $ `engines/support/general-support.h:42:9`! |
| 1409 | |
| 1410 | debugcxx . . $ debug(326aeb464d16410c). ("draw_option: detail=%s state=%d shadow=%d x=%d y=%d w=%d h=%d\n", |
| 1411 | detail, state_type, shadow_type, x, y, width, height); |
| 1412 | |
| 1413 | cr = ge_gdk_drawable_to_cairocxx . . $ ge_gdk_drawable_to_cairo(9aef5f42f17cdc6). (window, area); |
| 1414 | |
| 1415 | /* set up colours */ |
| 1416 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[GTK_STATE_NORMALcxx . . $ GTK_STATE_NORMAL.], &bg); |
| 1417 | /* outline colour */ |
| 1418 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&bg, OUTLINE_SHADEcxx . . $ `engines/crux/src/crux-draw.c:14:9`!, &outline); |
| 1419 | /* gradient colours */ |
| 1420 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&bg, 0.7, &c2); |
| 1421 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->whitecxx . . $ _GtkStyle#white., &c1); |
| 1422 | |
| 1423 | cx = x + (height / 2); |
| 1424 | cy = y + (height / 2); |
| 1425 | radius = (height / 2) - 0.5; |
| 1426 | |
| 1427 | if (!GE_IS_MENU_ITEMcxx . . $ `engines/support/widget-information.h:97:9`! (widget)) |
| 1428 | { |
| 1429 | cairo_arccxx . . $ cairo_arc(a3ae928d36564bf1). (cr, cx, cy, radius, 0.0, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`! * 2); |
| 1430 | |
| 1431 | if (state_type == GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.) |
| 1432 | { |
| 1433 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->bgcxx . . $ _GtkStyle#bg.[state_type]); |
| 1434 | cairo_fill_preservecxx . . $ cairo_fill_preserve(21788b7825b29bf). (cr); |
| 1435 | |
| 1436 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->fgcxx . . $ _GtkStyle#fg.[state_type]); |
| 1437 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1438 | } |
| 1439 | else |
| 1440 | { |
| 1441 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x + height, y + height); |
| 1442 | if (state_type != GTK_STATE_ACTIVEcxx . . $ GTK_STATE_ACTIVE.) |
| 1443 | { |
| 1444 | /* out shadow */ |
| 1445 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.2, c1.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c1.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c1.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 1446 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 1.0, c2.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c2.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c2.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 1447 | } |
| 1448 | else |
| 1449 | { |
| 1450 | /* in shadow */ |
| 1451 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.0, c2.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c2.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c2.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 1452 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 1.0, c1.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c1.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c1.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 1453 | } |
| 1454 | cairo_set_sourcecxx . . $ cairo_set_source(dab881992d64b89). (cr, crp); |
| 1455 | cairo_fill_preservecxx . . $ cairo_fill_preserve(21788b7825b29bf). (cr); |
| 1456 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (crp); |
| 1457 | |
| 1458 | ge_cairo_set_colorcxx . . $ ge_cairo_set_color(4f73748928299b29). (cr, &outline); |
| 1459 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1460 | |
| 1461 | cairo_arccxx . . $ cairo_arc(a3ae928d36564bf1). (cr, cx, cy, radius - 1.0, 0.0, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`! * 2); |
| 1462 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 1.0, 1.0, 1.0, 0.5); |
| 1463 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1464 | } |
| 1465 | /* only make the "dot" smaller if we have drawn a border */ |
| 1466 | radius = radius / 2.0; |
| 1467 | } |
| 1468 | |
| 1469 | |
| 1470 | if (shadow_type == GTK_SHADOW_INcxx . . $ GTK_SHADOW_IN.) |
| 1471 | { |
| 1472 | /* draw check mark */ |
| 1473 | cairo_arccxx . . $ cairo_arc(a3ae928d36564bf1). (cr, cx, cy, radius, 0.0, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`! * 2); |
| 1474 | |
| 1475 | if (state_type == GTK_STATE_INSENSITIVEcxx . . $ GTK_STATE_INSENSITIVE.) |
| 1476 | { |
| 1477 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->fgcxx . . $ _GtkStyle#fg.[state_type]); |
| 1478 | cairo_fill_preservecxx . . $ cairo_fill_preserve(21788b7825b29bf). (cr); |
| 1479 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1480 | } |
| 1481 | else |
| 1482 | { |
| 1483 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->lightcxx . . $ _GtkStyle#light.[GTK_STATE_SELECTEDcxx . . $ GTK_STATE_SELECTED.]); |
| 1484 | cairo_fill_preservecxx . . $ cairo_fill_preserve(21788b7825b29bf). (cr); |
| 1485 | |
| 1486 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->darkcxx . . $ _GtkStyle#dark.[GTK_STATE_SELECTEDcxx . . $ GTK_STATE_SELECTED.]); |
| 1487 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1488 | } |
| 1489 | } |
| 1490 | else if (shadow_type != GTK_SHADOW_OUTcxx . . $ GTK_SHADOW_OUT.) |
| 1491 | { |
| 1492 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0.0, 0.0, 0.0, 0.3); |
| 1493 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x + width / 4, y + (height /3) + 0.5, width - (width / 2), height / 4); |
| 1494 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 1495 | |
| 1496 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->bgcxx . . $ _GtkStyle#bg.[GTK_STATE_SELECTEDcxx . . $ GTK_STATE_SELECTED.]); |
| 1497 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x + width / 4, y + (height /3), width - (width / 2), height / 4); |
| 1498 | cairo_fillcxx . . $ cairo_fill(21788b7825b29bf). (cr); |
| 1499 | } |
| 1500 | |
| 1501 | |
| 1502 | |
| 1503 | cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr); |
| 1504 | } |
| 1505 | |
| 1506 | static void |
| 1507 | draw_tabcxx . . $ draw_tab(735e120c49b17d11). (GtkStylecxx . . $ GtkStyle# *style, |
| 1508 | GdkWindowcxx . . $ GdkWindow# *window, |
| 1509 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 1510 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 1511 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 1512 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 1513 | const gcharcxx . . $ gchar# *detail, gintcxx . . $ gint# x, gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height) |
| 1514 | { |
| 1515 | CHECK_ARGScxx . . $ `engines/support/general-support.h:38:9`! |
| 1516 | SANITIZE_SIZEcxx . . $ `engines/support/general-support.h:42:9`! |
| 1517 | |
| 1518 | /* Draws an option menu tab (the up and down pointing arrows) |
| 1519 | * TODO: Make this look neater |
| 1520 | */ |
| 1521 | debugcxx . . $ debug(326aeb464d16410c). ("draw_tab: detail=%s state=%d shadow=%d x=%d y=%d w=%d h=%d\n", |
| 1522 | detail, state_type, shadow_type, x, y, width, height); |
| 1523 | |
| 1524 | draw_arrowcxx . . $ draw_arrow(422be73dba64f040). (style, window, state_type, shadow_type, area, widget, detail, |
| 1525 | GTK_ARROW_UPcxx . . $ GTK_ARROW_UP., FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, x + (width / 2) - 2, y - (height / 2), 7, 7); |
| 1526 | |
| 1527 | draw_arrowcxx . . $ draw_arrow(422be73dba64f040). (style, window, state_type, shadow_type, area, widget, detail, |
| 1528 | GTK_ARROW_DOWNcxx . . $ GTK_ARROW_DOWN., FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, x + (width / 2) - 2, y + (height / 2), 7, 7); |
| 1529 | } |
| 1530 | |
| 1531 | static void |
| 1532 | draw_shadow_gapcxx . . $ draw_shadow_gap(6e03733adaa62f72). (GtkStylecxx . . $ GtkStyle# *style, |
| 1533 | GdkWindowcxx . . $ GdkWindow# *window, |
| 1534 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 1535 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 1536 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 1537 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 1538 | const gcharcxx . . $ gchar# *detail, |
| 1539 | gintcxx . . $ gint# x, |
| 1540 | gintcxx . . $ gint# y, |
| 1541 | gintcxx . . $ gint# width, |
| 1542 | gintcxx . . $ gint# height, |
| 1543 | GtkPositionTypecxx . . $ GtkPositionType# gap_side, gintcxx . . $ gint# gap_x, gintcxx . . $ gint# gap_width) |
| 1544 | { |
| 1545 | GdkRectanglecxx . . $ GdkRectangle# rect; |
| 1546 | |
| 1547 | CHECK_ARGScxx . . $ `engines/support/general-support.h:38:9`! |
| 1548 | SANITIZE_SIZEcxx . . $ `engines/support/general-support.h:42:9`! |
| 1549 | |
| 1550 | debugcxx . . $ debug(326aeb464d16410c). ("draw_shadow_gap: detail=%s state=%d shadow=%d x=%d y=%d w=%d h=%d\n", |
| 1551 | detail, state_type, shadow_type, x, y, width, height); |
| 1552 | |
| 1553 | gtk_paint_shadowcxx . . $ gtk_paint_shadow(54f500d38d6d35c3). (style, window, state_type, shadow_type, area, widget, |
| 1554 | detail, x, y, width, height); |
| 1555 | |
| 1556 | switch (gap_side) |
| 1557 | { |
| 1558 | case GTK_POS_TOPcxx . . $ GTK_POS_TOP.: |
| 1559 | rect.xcxx . . $ _GdkRectangle#x. = x + gap_x; |
| 1560 | rect.ycxx . . $ _GdkRectangle#y. = y; |
| 1561 | rect.widthcxx . . $ _GdkRectangle#width. = gap_width; |
| 1562 | rect.heightcxx . . $ _GdkRectangle#height. = 2; |
| 1563 | break; |
| 1564 | default: |
| 1565 | case GTK_POS_BOTTOMcxx . . $ GTK_POS_BOTTOM.: |
| 1566 | rect.xcxx . . $ _GdkRectangle#x. = x + gap_x; |
| 1567 | rect.ycxx . . $ _GdkRectangle#y. = y + height - 2; |
| 1568 | rect.widthcxx . . $ _GdkRectangle#width. = gap_width; |
| 1569 | rect.heightcxx . . $ _GdkRectangle#height. = 2; |
| 1570 | break; |
| 1571 | case GTK_POS_LEFTcxx . . $ GTK_POS_LEFT.: |
| 1572 | rect.xcxx . . $ _GdkRectangle#x. = x; |
| 1573 | rect.ycxx . . $ _GdkRectangle#y. = y + gap_x; |
| 1574 | rect.widthcxx . . $ _GdkRectangle#width. = 2; |
| 1575 | rect.heightcxx . . $ _GdkRectangle#height. = gap_width; |
| 1576 | break; |
| 1577 | case GTK_POS_RIGHTcxx . . $ GTK_POS_RIGHT.: |
| 1578 | rect.xcxx . . $ _GdkRectangle#x. = x + width - 2; |
| 1579 | rect.ycxx . . $ _GdkRectangle#y. = y + gap_x; |
| 1580 | rect.widthcxx . . $ _GdkRectangle#width. = 2; |
| 1581 | rect.heightcxx . . $ _GdkRectangle#height. = gap_width; |
| 1582 | break; |
| 1583 | } |
| 1584 | |
| 1585 | gtk_style_apply_default_backgroundcxx . . $ gtk_style_apply_default_background(fd43751780fe438e). (style, window, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, state_type, area, |
| 1586 | rect.xcxx . . $ _GdkRectangle#x., rect.ycxx . . $ _GdkRectangle#y., rect.widthcxx . . $ _GdkRectangle#width., rect.heightcxx . . $ _GdkRectangle#height.); |
| 1587 | } |
| 1588 | |
| 1589 | static void |
| 1590 | draw_box_gapcxx . . $ draw_box_gap(6e03733adaa62f72). (GtkStylecxx . . $ GtkStyle# *style, |
| 1591 | GdkWindowcxx . . $ GdkWindow# *window, |
| 1592 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 1593 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 1594 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 1595 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 1596 | const gcharcxx . . $ gchar# *detail, |
| 1597 | gintcxx . . $ gint# x, |
| 1598 | gintcxx . . $ gint# y, |
| 1599 | gintcxx . . $ gint# width, |
| 1600 | gintcxx . . $ gint# height, |
| 1601 | GtkPositionTypecxx . . $ GtkPositionType# gap_side, gintcxx . . $ gint# gap_x, gintcxx . . $ gint# gap_width) |
| 1602 | { |
| 1603 | GdkRectanglecxx . . $ GdkRectangle# rect; |
| 1604 | |
| 1605 | CHECK_ARGScxx . . $ `engines/support/general-support.h:38:9`! |
| 1606 | SANITIZE_SIZEcxx . . $ `engines/support/general-support.h:42:9`! |
| 1607 | |
| 1608 | debugcxx . . $ debug(326aeb464d16410c). ("draw_box_gap: detail=%s state=%d shadow=%d x=%d y=%d w=%d h=%d\n", |
| 1609 | detail, state_type, shadow_type, x, y, width, height); |
| 1610 | |
| 1611 | gtk_paint_boxcxx . . $ gtk_paint_box(54f500d38d6d35c3). (style, window, state_type, shadow_type, area, widget, |
| 1612 | detail, x, y, width, height); |
| 1613 | |
| 1614 | |
| 1615 | switch (gap_side) |
| 1616 | { |
| 1617 | case GTK_POS_TOPcxx . . $ GTK_POS_TOP.: |
| 1618 | rect.xcxx . . $ _GdkRectangle#x. = x + gap_x + 1; |
| 1619 | rect.ycxx . . $ _GdkRectangle#y. = y; |
| 1620 | rect.widthcxx . . $ _GdkRectangle#width. = gap_width - 2; |
| 1621 | rect.heightcxx . . $ _GdkRectangle#height. = 2; |
| 1622 | break; |
| 1623 | default: |
| 1624 | case GTK_POS_BOTTOMcxx . . $ GTK_POS_BOTTOM.: |
| 1625 | rect.xcxx . . $ _GdkRectangle#x. = x + gap_x + 1; |
| 1626 | rect.ycxx . . $ _GdkRectangle#y. = y + height - 2; |
| 1627 | rect.widthcxx . . $ _GdkRectangle#width. = gap_width - 2; |
| 1628 | rect.heightcxx . . $ _GdkRectangle#height. = 2; |
| 1629 | break; |
| 1630 | case GTK_POS_LEFTcxx . . $ GTK_POS_LEFT.: |
| 1631 | rect.xcxx . . $ _GdkRectangle#x. = x; |
| 1632 | rect.ycxx . . $ _GdkRectangle#y. = y + gap_x + 1; |
| 1633 | rect.widthcxx . . $ _GdkRectangle#width. = 2; |
| 1634 | rect.heightcxx . . $ _GdkRectangle#height. = gap_width - 2; |
| 1635 | break; |
| 1636 | case GTK_POS_RIGHTcxx . . $ GTK_POS_RIGHT.: |
| 1637 | rect.xcxx . . $ _GdkRectangle#x. = x + width - 2; |
| 1638 | rect.ycxx . . $ _GdkRectangle#y. = y + gap_x + 1; |
| 1639 | rect.widthcxx . . $ _GdkRectangle#width. = 2; |
| 1640 | rect.heightcxx . . $ _GdkRectangle#height. = gap_width - 2; |
| 1641 | break; |
| 1642 | } |
| 1643 | |
| 1644 | gtk_style_apply_default_backgroundcxx . . $ gtk_style_apply_default_background(fd43751780fe438e). (style, window, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, state_type, area, |
| 1645 | rect.xcxx . . $ _GdkRectangle#x., rect.ycxx . . $ _GdkRectangle#y., rect.widthcxx . . $ _GdkRectangle#width., rect.heightcxx . . $ _GdkRectangle#height.); |
| 1646 | } |
| 1647 | |
| 1648 | static void |
| 1649 | draw_extensioncxx . . $ draw_extension(ab7d29722d577c46). (GtkStylecxx . . $ GtkStyle# *style, |
| 1650 | GdkWindowcxx . . $ GdkWindow# *window, |
| 1651 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 1652 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 1653 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 1654 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 1655 | const gcharcxx . . $ gchar# *detail, |
| 1656 | gintcxx . . $ gint# x, |
| 1657 | gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height, GtkPositionTypecxx . . $ GtkPositionType# gap_side) |
| 1658 | { |
| 1659 | cairo_tcxx . . $ cairo_t# *cr; |
| 1660 | cairo_pattern_tcxx . . $ cairo_pattern_t# *crp; |
| 1661 | CairoColorcxx . . $ CairoColor# c1, c2, bg, outline; |
| 1662 | CairoCornerscxx . . $ CairoCorners# corners; |
| 1663 | gdoublecxx . . $ gdouble# radius = 2; |
| 1664 | |
| 1665 | debugcxx . . $ debug(326aeb464d16410c). ("draw_extension: detail=%s state=%d shadow=%d x=%d y=%d w=%d h=%d\n", |
| 1666 | detail, state_type, shadow_type, x, y, width, height); |
| 1667 | |
| 1668 | cr = ge_gdk_drawable_to_cairocxx . . $ ge_gdk_drawable_to_cairo(9aef5f42f17cdc6). (window, area); |
| 1669 | |
| 1670 | /* set up colours */ |
| 1671 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[state_type], &bg); |
| 1672 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&bg, 1.1, &c1); |
| 1673 | c2.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r. = bg.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r.; c2.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g. = bg.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g.; c2.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b. = bg.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.; |
| 1674 | |
| 1675 | /* make sure the correct area is clipped */ |
| 1676 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x, y, width, height); |
| 1677 | cairo_clipcxx . . $ cairo_clip(21788b7825b29bf). (cr); |
| 1678 | |
| 1679 | /* outline colour */ |
| 1680 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&bg, OUTLINE_SHADEcxx . . $ `engines/crux/src/crux-draw.c:14:9`!, &outline); |
| 1681 | |
| 1682 | switch (gap_side) |
| 1683 | { |
| 1684 | case GTK_POS_TOPcxx . . $ GTK_POS_TOP.: |
| 1685 | /* bottom tab */ |
| 1686 | y -= style->ythicknesscxx . . $ _GtkStyle#ythickness.; |
| 1687 | height += style->ythicknesscxx . . $ _GtkStyle#ythickness.; |
| 1688 | corners = CR_CORNER_BOTTOMLEFTcxx . . $ CR_CORNER_BOTTOMLEFT. + CR_CORNER_BOTTOMRIGHTcxx . . $ CR_CORNER_BOTTOMRIGHT.; |
| 1689 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y + height, x, y); |
| 1690 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&c2, 0.8, &c1); |
| 1691 | break; |
| 1692 | default: |
| 1693 | case GTK_POS_BOTTOMcxx . . $ GTK_POS_BOTTOM.: |
| 1694 | /* top tab */ |
| 1695 | height += style->ythicknesscxx . . $ _GtkStyle#ythickness.; |
| 1696 | corners = CR_CORNER_TOPLEFTcxx . . $ CR_CORNER_TOPLEFT. + CR_CORNER_TOPRIGHTcxx . . $ CR_CORNER_TOPRIGHT.; |
| 1697 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x, y + height); |
| 1698 | break; |
| 1699 | case GTK_POS_LEFTcxx . . $ GTK_POS_LEFT.: |
| 1700 | /* right tab */ |
| 1701 | x -= style->xthicknesscxx . . $ _GtkStyle#xthickness.; |
| 1702 | width += style->xthicknesscxx . . $ _GtkStyle#xthickness.; |
| 1703 | corners = CR_CORNER_TOPRIGHTcxx . . $ CR_CORNER_TOPRIGHT. + CR_CORNER_BOTTOMRIGHTcxx . . $ CR_CORNER_BOTTOMRIGHT.; |
| 1704 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x + width, y, x, y); |
| 1705 | break; |
| 1706 | case GTK_POS_RIGHTcxx . . $ GTK_POS_RIGHT.: |
| 1707 | /* left tab */ |
| 1708 | width += style->xthicknesscxx . . $ _GtkStyle#xthickness.; |
| 1709 | corners = CR_CORNER_BOTTOMLEFTcxx . . $ CR_CORNER_BOTTOMLEFT. + CR_CORNER_TOPLEFTcxx . . $ CR_CORNER_TOPLEFT.; |
| 1710 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x + width, y); |
| 1711 | break; |
| 1712 | } |
| 1713 | |
| 1714 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, x + 0.5, y + 0.5, width - 1.0, height - 1.0, radius, corners); |
| 1715 | |
| 1716 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.0, c1.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c1.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c1.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 1717 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.3, c2.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c2.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c2.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 1718 | cairo_set_sourcecxx . . $ cairo_set_source(dab881992d64b89). (cr, crp); |
| 1719 | cairo_fill_preservecxx . . $ cairo_fill_preserve(21788b7825b29bf). (cr); |
| 1720 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (crp); |
| 1721 | |
| 1722 | ge_cairo_set_colorcxx . . $ ge_cairo_set_color(4f73748928299b29). (cr, &outline); |
| 1723 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1724 | |
| 1725 | x++; y++; width -= 2.0; height -= 2.0; |
| 1726 | radius--; |
| 1727 | |
| 1728 | /* setup for stroke */ |
| 1729 | cairo_translatecxx . . $ cairo_translate(e818af540ecaa23a). (cr, 0.5, 0.5); |
| 1730 | width--; height--; |
| 1731 | |
| 1732 | if (state_type == GTK_STATE_NORMALcxx . . $ GTK_STATE_NORMAL.) |
| 1733 | { |
| 1734 | /* we want to draw outside the width/height now */ |
| 1735 | cairo_reset_clipcxx . . $ cairo_reset_clip(21788b7825b29bf). (cr); |
| 1736 | |
| 1737 | switch (gap_side) |
| 1738 | { |
| 1739 | /* top */ |
| 1740 | case GTK_POS_BOTTOMcxx . . $ GTK_POS_BOTTOM.: |
| 1741 | height++; |
| 1742 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x, y + height); |
| 1743 | cairo_arccxx . . $ cairo_arc(a3ae928d36564bf1). (cr, x + radius, y + radius, radius, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`!, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`! * 1.5); |
| 1744 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width - radius, y); |
| 1745 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 1, 1, 1, 0.7); |
| 1746 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1747 | |
| 1748 | cairo_arccxx . . $ cairo_arc(a3ae928d36564bf1). (cr, x + width - radius, y + radius, radius, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`! * 1.5, 0); |
| 1749 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width, y + height - 1); |
| 1750 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0, 0, 0, 0.2); |
| 1751 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1752 | break; |
| 1753 | /* bottom */ |
| 1754 | case GTK_POS_TOPcxx . . $ GTK_POS_TOP.: |
| 1755 | y -= 1; height += 1; |
| 1756 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x, y); |
| 1757 | cairo_arc_negativecxx . . $ cairo_arc_negative(a3ae928d36564bf1). (cr, x + radius, y + height - radius, radius, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`!, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`! * 0.5); |
| 1758 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 1, 1, 1, 0.7); |
| 1759 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1760 | |
| 1761 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x + 1, y + height); |
| 1762 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width - radius, y + height); |
| 1763 | cairo_arc_negativecxx . . $ cairo_arc_negative(a3ae928d36564bf1). (cr, x + width - radius, y + height - radius, radius, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`! * 0.5, 0); |
| 1764 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width, y); |
| 1765 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0, 0, 0, 0.2); |
| 1766 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1767 | break; |
| 1768 | /* right */ |
| 1769 | case GTK_POS_LEFTcxx . . $ GTK_POS_LEFT.: |
| 1770 | x -= 1; width += 1; |
| 1771 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x, y); |
| 1772 | cairo_arccxx . . $ cairo_arc(a3ae928d36564bf1). (cr, x + width - radius, y + radius, radius, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`! * 1.5, 0); |
| 1773 | cairo_arccxx . . $ cairo_arc(a3ae928d36564bf1). (cr, x + width - radius, y + height - radius, radius, 0, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`! * 0.5); |
| 1774 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 1, 1, 1, 0.7); |
| 1775 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1776 | |
| 1777 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x + width - 1, y + height); |
| 1778 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x, y + height); |
| 1779 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0, 0, 0, 0.2); |
| 1780 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1781 | break; |
| 1782 | /* left */ |
| 1783 | case GTK_POS_RIGHTcxx . . $ GTK_POS_RIGHT.: |
| 1784 | width += 1; |
| 1785 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x + width, y); |
| 1786 | cairo_arc_negativecxx . . $ cairo_arc_negative(a3ae928d36564bf1). (cr, x + radius, y + radius, radius, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`! * 1.5, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`!); |
| 1787 | cairo_arc_negativecxx . . $ cairo_arc_negative(a3ae928d36564bf1). (cr, x + radius, y + height - radius, radius, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`!, G_PIcxx . . $ `<external>/10787549987161854489/gtypes.h:201:9`! * 0.5); |
| 1788 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 1, 1, 1, 0.7); |
| 1789 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1790 | |
| 1791 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, x + 1, y + height); |
| 1792 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, x + width, y + height); |
| 1793 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 0, 0, 0, 0.2); |
| 1794 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1795 | break; |
| 1796 | } |
| 1797 | |
| 1798 | } |
| 1799 | else |
| 1800 | { |
| 1801 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, x, y, width, height, 1.0, corners); |
| 1802 | cairo_set_source_rgbacxx . . $ cairo_set_source_rgba(1653902e9f448da4). (cr, 1.0, 1.0, 1.0, 0.5); |
| 1803 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1804 | } |
| 1805 | |
| 1806 | |
| 1807 | |
| 1808 | cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr); |
| 1809 | } |
| 1810 | |
| 1811 | static void |
| 1812 | draw_focuscxx . . $ draw_focus(90051e0a087ec90c). (GtkStylecxx . . $ GtkStyle# *style, |
| 1813 | GdkWindowcxx . . $ GdkWindow# *window, |
| 1814 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 1815 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 1816 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 1817 | const gcharcxx . . $ gchar# *detail, gintcxx . . $ gint# x, gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height) |
| 1818 | { |
| 1819 | debugcxx . . $ debug(326aeb464d16410c). ("draw_focus: detail=%s x=%d y=%d w=%d h=%d\n", |
| 1820 | detail, x, y, width, height); |
| 1821 | |
| 1822 | if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("entry")) |
| 1823 | { |
| 1824 | cairo_tcxx . . $ cairo_t# *cr; |
| 1825 | cr = ge_gdk_drawable_to_cairocxx . . $ ge_gdk_drawable_to_cairo(9aef5f42f17cdc6). (window, area); |
| 1826 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x + 0.5, y + 0.5, width - 1.0, height - 1.0); |
| 1827 | gdk_cairo_set_source_colorcxx . . $ gdk_cairo_set_source_color(e033c9a26e3e7720). (cr, &style->basecxx . . $ _GtkStyle#base.[GTK_STATE_SELECTEDcxx . . $ GTK_STATE_SELECTED.]); |
| 1828 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1829 | cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr); |
| 1830 | return; |
| 1831 | } |
| 1832 | |
| 1833 | /* buttons draw their own focus indicator */ |
| 1834 | if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("button")) |
| 1835 | return; |
| 1836 | |
| 1837 | /* Make sure no widget is without a focus indicator! */ |
| 1838 | parent_style_classcxx . . $ parent_style_class.->draw_focuscxx . . $ _GtkStyleClass#draw_focus.(style, window, state_type, area, widget, |
| 1839 | detail, x, y, width, height); |
| 1840 | } |
| 1841 | |
| 1842 | static void |
| 1843 | draw_slidercxx . . $ draw_slider(30bf754f222a37c2). (GtkStylecxx . . $ GtkStyle# *style, |
| 1844 | GdkWindowcxx . . $ GdkWindow# *window, |
| 1845 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 1846 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 1847 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 1848 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 1849 | const gcharcxx . . $ gchar# *detail, |
| 1850 | gintcxx . . $ gint# x, |
| 1851 | gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height, GtkOrientationcxx . . $ GtkOrientation# orientation) |
| 1852 | { |
| 1853 | cairo_tcxx . . $ cairo_t# *cr; |
| 1854 | cairo_pattern_tcxx . . $ cairo_pattern_t# *crp; |
| 1855 | CairoColorcxx . . $ CairoColor# c1, c2; |
| 1856 | gbooleancxx . . $ gboolean# is_scale = (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("vscale") || DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("hscale")); |
| 1857 | |
| 1858 | CHECK_ARGScxx . . $ `engines/support/general-support.h:38:9`! |
| 1859 | SANITIZE_SIZEcxx . . $ `engines/support/general-support.h:42:9`! |
| 1860 | |
| 1861 | debugcxx . . $ debug(326aeb464d16410c). ("draw_slider: detail=%s state=%d shadow=%d x=%d y=%d w=%d h=%d\n", detail, state_type, shadow_type, x, y, width, height); |
| 1862 | |
| 1863 | cr = ge_gdk_drawable_to_cairocxx . . $ ge_gdk_drawable_to_cairo(9aef5f42f17cdc6). (window, area); |
| 1864 | |
| 1865 | |
| 1866 | ge_gdk_color_to_cairocxx . . $ ge_gdk_color_to_cairo(2a93fb363f86aab6). (&style->bgcxx . . $ _GtkStyle#bg.[GTK_STATE_SELECTEDcxx . . $ GTK_STATE_SELECTED.], &c2); |
| 1867 | |
| 1868 | /* light */ |
| 1869 | CRUX_LIGHTcxx . . $ `engines/crux/src/crux-draw.c:16:9`! (c2, c1); |
| 1870 | |
| 1871 | if (state_type == GTK_STATE_PRELIGHTcxx . . $ GTK_STATE_PRELIGHT.) |
| 1872 | { |
| 1873 | ge_shade_colorcxx . . $ ge_shade_color(ddf08f49ed67ac13). (&c1, 1.2, &c1); |
| 1874 | } |
| 1875 | |
| 1876 | /* dark */ |
| 1877 | CRUX_DARKcxx . . $ `engines/crux/src/crux-draw.c:17:9`! (c2, c2); |
| 1878 | |
| 1879 | if (widget != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && GTK_WIDGET_HAS_FOCUScxx . . $ `<external>/2077894753000033433/gtkwidget.h:338:9`! (widget)) |
| 1880 | { |
| 1881 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, x+0.5, y+0.5, width-1.0, height-1.0, 2, CR_CORNER_ALLcxx . . $ CR_CORNER_ALL.); |
| 1882 | } |
| 1883 | |
| 1884 | if (orientation == GTK_ORIENTATION_VERTICALcxx . . $ GTK_ORIENTATION_VERTICAL.) |
| 1885 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x + width, y); |
| 1886 | else |
| 1887 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x, y + height); |
| 1888 | |
| 1889 | if (is_scale) |
| 1890 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, x+0.5, y+0.5, width-1.0, height-1.0, 2, CR_CORNER_ALLcxx . . $ CR_CORNER_ALL.); |
| 1891 | else |
| 1892 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x + 0.5, y + 0.5, width - 1.0, height - 1.0); |
| 1893 | |
| 1894 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 0.0, c1.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c1.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c1.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 1895 | cairo_pattern_add_color_stop_rgbcxx . . $ cairo_pattern_add_color_stop_rgb(b94e5fc262f4a536). (crp, 1.0, c2.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c2.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c2.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 1896 | cairo_set_sourcecxx . . $ cairo_set_source(dab881992d64b89). (cr, crp); |
| 1897 | cairo_fill_preservecxx . . $ cairo_fill_preserve(21788b7825b29bf). (cr); |
| 1898 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (crp); |
| 1899 | |
| 1900 | cairo_set_source_rgbcxx . . $ cairo_set_source_rgb(2bdc80def475f266). (cr, c2.rcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#r., c2.gcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#g., c2.bcxx . . $ $anonymous_type_869d4fa2f25cb9b0_0#b.); |
| 1901 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1902 | |
| 1903 | |
| 1904 | /* bevel */ |
| 1905 | if (is_scale) |
| 1906 | ge_cairo_rounded_rectanglecxx . . $ ge_cairo_rounded_rectangle(b3a321db18877b05). (cr, x+1.5, y+1.5, width-3.0, height-3.0, 2, CR_CORNER_ALLcxx . . $ CR_CORNER_ALL.); |
| 1907 | else |
| 1908 | cairo_rectanglecxx . . $ cairo_rectangle(1653902e9f448da4). (cr, x+1.5, y+1.5, width-3.0, height-3.0); |
| 1909 | |
| 1910 | if (orientation == GTK_ORIENTATION_VERTICALcxx . . $ GTK_ORIENTATION_VERTICAL.) |
| 1911 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x + width, y); |
| 1912 | else |
| 1913 | crp = cairo_pattern_create_linearcxx . . $ cairo_pattern_create_linear(8217558d88209ec9). (x, y, x, y + height); |
| 1914 | cairo_pattern_add_color_stop_rgbacxx . . $ cairo_pattern_add_color_stop_rgba(52caebadf4264343). (crp, 0.0, 1.0, 1.0, 1.0, 0.2); |
| 1915 | cairo_pattern_add_color_stop_rgbacxx . . $ cairo_pattern_add_color_stop_rgba(52caebadf4264343). (crp, 1.0, 1.0, 1.0, 1.0, 0.1); |
| 1916 | cairo_set_sourcecxx . . $ cairo_set_source(dab881992d64b89). (cr, crp); |
| 1917 | cairo_strokecxx . . $ cairo_stroke(21788b7825b29bf). (cr); |
| 1918 | |
| 1919 | cairo_pattern_destroycxx . . $ cairo_pattern_destroy(f75fcc8819286708). (crp); |
| 1920 | |
| 1921 | |
| 1922 | cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr); |
| 1923 | } |
| 1924 | |
| 1925 | static void |
| 1926 | draw_handlecxx . . $ draw_handle(30bf754f222a37c2). (GtkStylecxx . . $ GtkStyle# *style, |
| 1927 | GdkWindowcxx . . $ GdkWindow# *window, |
| 1928 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 1929 | GtkShadowTypecxx . . $ GtkShadowType# shadow_type, |
| 1930 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 1931 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 1932 | const gcharcxx . . $ gchar# *detail, |
| 1933 | gintcxx . . $ gint# x, |
| 1934 | gintcxx . . $ gint# y, gintcxx . . $ gint# width, gintcxx . . $ gint# height, GtkOrientationcxx . . $ GtkOrientation# orientation) |
| 1935 | { |
| 1936 | gintcxx . . $ gint# i, yy, xx; |
| 1937 | gintcxx . . $ gint# xthick, ythick; |
| 1938 | GdkGCcxx . . $ GdkGC# *light_gc, *dark_gc; |
| 1939 | GdkRectanglecxx . . $ GdkRectangle# dest; |
| 1940 | |
| 1941 | CHECK_ARGScxx . . $ `engines/support/general-support.h:38:9`! |
| 1942 | SANITIZE_SIZEcxx . . $ `engines/support/general-support.h:42:9`! |
| 1943 | |
| 1944 | debugcxx . . $ debug(326aeb464d16410c). ("draw_handle: detail=%s state=%d shadow=%d x=%d y=%d w=%d h=%d\n", |
| 1945 | detail, state_type, shadow_type, x, y, width, height); |
| 1946 | |
| 1947 | if (DETAILcxx . . $ `engines/crux/src/crux-draw.c:12:9`! ("dockitem") && state_type == GTK_STATE_NORMALcxx . . $ GTK_STATE_NORMAL.) |
| 1948 | state_type = GTK_STATE_ACTIVEcxx . . $ GTK_STATE_ACTIVE.; |
| 1949 | |
| 1950 | |
| 1951 | light_gc = style->light_gccxx . . $ _GtkStyle#light_gc.[state_type]; |
| 1952 | dark_gc = style->dark_gccxx . . $ _GtkStyle#dark_gc.[state_type]; |
| 1953 | |
| 1954 | xthick = style->xthicknesscxx . . $ _GtkStyle#xthickness. + 1; |
| 1955 | ythick = style->ythicknesscxx . . $ _GtkStyle#ythickness. + 1; |
| 1956 | |
| 1957 | dest.xcxx . . $ _GdkRectangle#x. = x + xthick; |
| 1958 | dest.ycxx . . $ _GdkRectangle#y. = y + ythick; |
| 1959 | dest.widthcxx . . $ _GdkRectangle#width. = width - (xthick * 2); |
| 1960 | dest.heightcxx . . $ _GdkRectangle#height. = height - (ythick * 2); |
| 1961 | |
| 1962 | gdk_gc_set_clip_rectanglecxx . . $ gdk_gc_set_clip_rectangle(bce0f67ae11ba477). (light_gc, &dest); |
| 1963 | gdk_gc_set_clip_rectanglecxx . . $ gdk_gc_set_clip_rectangle(bce0f67ae11ba477). (dark_gc, &dest); |
| 1964 | |
| 1965 | /* ORIENTATION parameters is unreliable */ |
| 1966 | if (height > width) |
| 1967 | { |
| 1968 | yy = y + height / 2 - 4; |
| 1969 | for (i = 0; i < 8; i += 2) |
| 1970 | { |
| 1971 | gdk_draw_linecxx . . $ gdk_draw_line(288444c2c25f2a73). (window, dark_gc, xthick, yy + i, |
| 1972 | x + width - xthick, yy + i); |
| 1973 | gdk_draw_linecxx . . $ gdk_draw_line(288444c2c25f2a73). (window, light_gc, xthick, yy + i + 1, |
| 1974 | x + width - xthick, yy + i + 1); |
| 1975 | } |
| 1976 | } |
| 1977 | else |
| 1978 | { |
| 1979 | xx = x + width / 2 - 4; |
| 1980 | for (i = 0; i < 8; i += 2) |
| 1981 | { |
| 1982 | gdk_draw_linecxx . . $ gdk_draw_line(288444c2c25f2a73). (window, dark_gc, xx + i, ythick, |
| 1983 | xx + i, y + height - ythick); |
| 1984 | gdk_draw_linecxx . . $ gdk_draw_line(288444c2c25f2a73). (window, light_gc, xx + i + 1, ythick, |
| 1985 | xx + i + 1, y + height - ythick); |
| 1986 | } |
| 1987 | } |
| 1988 | |
| 1989 | gdk_gc_set_clip_rectanglecxx . . $ gdk_gc_set_clip_rectangle(bce0f67ae11ba477). (light_gc, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1990 | gdk_gc_set_clip_rectanglecxx . . $ gdk_gc_set_clip_rectangle(bce0f67ae11ba477). (dark_gc, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1991 | } |
| 1992 | |
| 1993 | static void |
| 1994 | draw_layoutcxx . . $ draw_layout(7890dd7f2ced35dc). (GtkStylecxx . . $ GtkStyle# *style, |
| 1995 | GdkWindowcxx . . $ GdkWindow# *window, |
| 1996 | GtkStateTypecxx . . $ GtkStateType# state_type, |
| 1997 | gbooleancxx . . $ gboolean# use_text, |
| 1998 | GdkRectanglecxx . . $ GdkRectangle# *area, |
| 1999 | GtkWidgetcxx . . $ GtkWidget# *widget, |
| 2000 | const char *detail, |
| 2001 | int x, |
| 2002 | int y, |
| 2003 | PangoLayoutcxx . . $ PangoLayout# *layout) |
| 2004 | { |
| 2005 | GdkGCcxx . . $ GdkGC# *gc; |
| 2006 | |
| 2007 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_STYLEcxx . . $ `<external>/9172685273831718662/gtkstyle.h:44:9`! (style)); |
| 2008 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (window != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2009 | |
| 2010 | gc = use_text ? style->text_gccxx . . $ _GtkStyle#text_gc.[state_type] : style->fg_gccxx . . $ _GtkStyle#fg_gc.[state_type]; |
| 2011 | |
| 2012 | if (area) { |
| 2013 | gdk_gc_set_clip_rectanglecxx . . $ gdk_gc_set_clip_rectangle(bce0f67ae11ba477). (gc, area); |
| 2014 | } |
| 2015 | |
| 2016 | gdk_draw_layoutcxx . . $ gdk_draw_layout(8c5ae298002d0a6c). (window, gc, x, y, layout); |
| 2017 | |
| 2018 | if (area) { |
| 2019 | gdk_gc_set_clip_rectanglecxx . . $ gdk_gc_set_clip_rectangle(bce0f67ae11ba477). (gc, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 2020 | } |
| 2021 | } |
| 2022 | |
| 2023 | |
| 2024 | void |
| 2025 | crux_draw_style_class_initcxx . . $ crux_draw_style_class_init(e490d44ac2f97099). (GtkStyleClasscxx . . $ GtkStyleClass# *style_class) |
| 2026 | { |
| 2027 | |
| 2028 | parent_style_classcxx . . $ parent_style_class. = g_type_class_peek_parentcxx . . $ g_type_class_peek_parent(9f162e79bfc6c74).(style_class); |
| 2029 | |
| 2030 | style_class->draw_hlinecxx . . $ _GtkStyleClass#draw_hline. = draw_hlinecxx . . $ draw_hline(8560bb68e408b10a).; |
| 2031 | style_class->draw_vlinecxx . . $ _GtkStyleClass#draw_vline. = draw_vlinecxx . . $ draw_vline(8560bb68e408b10a).; |
| 2032 | style_class->draw_shadowcxx . . $ _GtkStyleClass#draw_shadow. = draw_shadowcxx . . $ draw_shadow(735e120c49b17d11).; |
| 2033 | style_class->draw_arrowcxx . . $ _GtkStyleClass#draw_arrow. = draw_arrowcxx . . $ draw_arrow(422be73dba64f040).; |
| 2034 | style_class->draw_boxcxx . . $ _GtkStyleClass#draw_box. = draw_boxcxx . . $ draw_box(735e120c49b17d11).; |
| 2035 | style_class->draw_checkcxx . . $ _GtkStyleClass#draw_check. = draw_checkcxx . . $ draw_check(735e120c49b17d11).; |
| 2036 | style_class->draw_optioncxx . . $ _GtkStyleClass#draw_option. = draw_optioncxx . . $ draw_option(735e120c49b17d11).; |
| 2037 | style_class->draw_tabcxx . . $ _GtkStyleClass#draw_tab. = draw_tabcxx . . $ draw_tab(735e120c49b17d11).; |
| 2038 | style_class->draw_shadow_gapcxx . . $ _GtkStyleClass#draw_shadow_gap. = draw_shadow_gapcxx . . $ draw_shadow_gap(6e03733adaa62f72).; |
| 2039 | style_class->draw_box_gapcxx . . $ _GtkStyleClass#draw_box_gap. = draw_box_gapcxx . . $ draw_box_gap(6e03733adaa62f72).; |
| 2040 | style_class->draw_extensioncxx . . $ _GtkStyleClass#draw_extension. = draw_extensioncxx . . $ draw_extension(ab7d29722d577c46).; |
| 2041 | style_class->draw_focuscxx . . $ _GtkStyleClass#draw_focus. = draw_focuscxx . . $ draw_focus(90051e0a087ec90c).; |
| 2042 | style_class->draw_slidercxx . . $ _GtkStyleClass#draw_slider. = draw_slidercxx . . $ draw_slider(30bf754f222a37c2).; |
| 2043 | style_class->draw_handlecxx . . $ _GtkStyleClass#draw_handle. = draw_handlecxx . . $ draw_handle(30bf754f222a37c2).; |
| 2044 | style_class->draw_layoutcxx . . $ _GtkStyleClass#draw_layout. = draw_layoutcxx . . $ draw_layout(7890dd7f2ced35dc).; |
| 2045 | } |