Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

946 wiersze
32 KiB

  1. /* GTK - The GIMP Toolkit
  2. * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the
  16. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17. * Boston, MA 02111-1307, USA.
  18. */
  19. /*
  20. * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
  21. * file for a list of people on the GTK+ Team. See the ChangeLog
  22. * files for a list of changes. These files are distributed with
  23. * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  24. */
  25. #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
  26. #error "Only <gtk/gtk.h> can be included directly."
  27. #endif
  28. #ifndef __GTK_STYLE_H__
  29. #define __GTK_STYLE_H__
  30. #include <gdk/gdk.h>
  31. #include <gtk/gtkenums.h>
  32. G_BEGIN_DECLS
  33. #define GTK_TYPE_STYLE (gtk_style_get_type ())
  34. #define GTK_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_STYLE, GtkStyle))
  35. #define GTK_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_STYLE, GtkStyleClass))
  36. #define GTK_IS_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_STYLE))
  37. #define GTK_IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_STYLE))
  38. #define GTK_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_STYLE, GtkStyleClass))
  39. #define GTK_TYPE_BORDER (gtk_border_get_type ())
  40. /* Some forward declarations needed to rationalize the header
  41. * files.
  42. */
  43. typedef struct _GtkBorder GtkBorder;
  44. typedef struct _GtkStyle GtkStyle;
  45. typedef struct _GtkStyleClass GtkStyleClass;
  46. typedef struct _GtkThemeEngine GtkThemeEngine;
  47. typedef struct _GtkRcStyle GtkRcStyle;
  48. typedef struct _GtkIconSet GtkIconSet;
  49. typedef struct _GtkIconSource GtkIconSource;
  50. typedef struct _GtkRcProperty GtkRcProperty;
  51. typedef struct _GtkSettings GtkSettings;
  52. typedef gboolean (*GtkRcPropertyParser) (const GParamSpec *pspec,
  53. const GString *rc_string,
  54. GValue *property_value);
  55. /* We make this forward declaration here, since we pass
  56. * GtkWidget's to the draw functions.
  57. */
  58. typedef struct _GtkWidget GtkWidget;
  59. #define GTK_STYLE_ATTACHED(style) (GTK_STYLE (style)->attach_count > 0)
  60. struct _GtkStyle
  61. {
  62. GObject parent_instance;
  63. /*< public >*/
  64. GdkColor fg[5];
  65. GdkColor bg[5];
  66. GdkColor light[5];
  67. GdkColor dark[5];
  68. GdkColor mid[5];
  69. GdkColor text[5];
  70. GdkColor base[5];
  71. GdkColor text_aa[5]; /* Halfway between text/base */
  72. GdkColor black;
  73. GdkColor white;
  74. PangoFontDescription *font_desc;
  75. gint xthickness;
  76. gint ythickness;
  77. GdkGC *fg_gc[5];
  78. GdkGC *bg_gc[5];
  79. GdkGC *light_gc[5];
  80. GdkGC *dark_gc[5];
  81. GdkGC *mid_gc[5];
  82. GdkGC *text_gc[5];
  83. GdkGC *base_gc[5];
  84. GdkGC *text_aa_gc[5];
  85. GdkGC *black_gc;
  86. GdkGC *white_gc;
  87. GdkPixmap *bg_pixmap[5];
  88. /*< private >*/
  89. gint attach_count;
  90. gint depth;
  91. GdkColormap *colormap;
  92. GdkFont *private_font;
  93. PangoFontDescription *private_font_desc; /* Font description for style->private_font or %NULL */
  94. /* the RcStyle from which this style was created */
  95. GtkRcStyle *rc_style;
  96. GSList *styles; /* of type GtkStyle* */
  97. GArray *property_cache;
  98. GSList *icon_factories; /* of type GtkIconFactory* */
  99. };
  100. struct _GtkStyleClass
  101. {
  102. GObjectClass parent_class;
  103. /* Initialize for a particular colormap/depth
  104. * combination. style->colormap/style->depth will have
  105. * been set at this point. Will typically chain to parent.
  106. */
  107. void (*realize) (GtkStyle *style);
  108. /* Clean up for a particular colormap/depth combination. Will
  109. * typically chain to parent.
  110. */
  111. void (*unrealize) (GtkStyle *style);
  112. /* Make style an exact duplicate of src.
  113. */
  114. void (*copy) (GtkStyle *style,
  115. GtkStyle *src);
  116. /* Create an empty style of the same type as this style.
  117. * The default implementation, which does
  118. * g_object_new (G_OBJECT_TYPE (style), NULL);
  119. * should work in most cases.
  120. */
  121. GtkStyle *(*clone) (GtkStyle *style);
  122. /* Initialize the GtkStyle with the values in the GtkRcStyle.
  123. * should chain to the parent implementation.
  124. */
  125. void (*init_from_rc) (GtkStyle *style,
  126. GtkRcStyle *rc_style);
  127. void (*set_background) (GtkStyle *style,
  128. GdkWindow *window,
  129. GtkStateType state_type);
  130. GdkPixbuf * (* render_icon) (GtkStyle *style,
  131. const GtkIconSource *source,
  132. GtkTextDirection direction,
  133. GtkStateType state,
  134. GtkIconSize size,
  135. GtkWidget *widget,
  136. const gchar *detail);
  137. /* Drawing functions
  138. */
  139. void (*draw_hline) (GtkStyle *style,
  140. GdkWindow *window,
  141. GtkStateType state_type,
  142. GdkRectangle *area,
  143. GtkWidget *widget,
  144. const gchar *detail,
  145. gint x1,
  146. gint x2,
  147. gint y);
  148. void (*draw_vline) (GtkStyle *style,
  149. GdkWindow *window,
  150. GtkStateType state_type,
  151. GdkRectangle *area,
  152. GtkWidget *widget,
  153. const gchar *detail,
  154. gint y1_,
  155. gint y2_,
  156. gint x);
  157. void (*draw_shadow) (GtkStyle *style,
  158. GdkWindow *window,
  159. GtkStateType state_type,
  160. GtkShadowType shadow_type,
  161. GdkRectangle *area,
  162. GtkWidget *widget,
  163. const gchar *detail,
  164. gint x,
  165. gint y,
  166. gint width,
  167. gint height);
  168. void (*draw_polygon) (GtkStyle *style,
  169. GdkWindow *window,
  170. GtkStateType state_type,
  171. GtkShadowType shadow_type,
  172. GdkRectangle *area,
  173. GtkWidget *widget,
  174. const gchar *detail,
  175. GdkPoint *point,
  176. gint npoints,
  177. gboolean fill);
  178. void (*draw_arrow) (GtkStyle *style,
  179. GdkWindow *window,
  180. GtkStateType state_type,
  181. GtkShadowType shadow_type,
  182. GdkRectangle *area,
  183. GtkWidget *widget,
  184. const gchar *detail,
  185. GtkArrowType arrow_type,
  186. gboolean fill,
  187. gint x,
  188. gint y,
  189. gint width,
  190. gint height);
  191. void (*draw_diamond) (GtkStyle *style,
  192. GdkWindow *window,
  193. GtkStateType state_type,
  194. GtkShadowType shadow_type,
  195. GdkRectangle *area,
  196. GtkWidget *widget,
  197. const gchar *detail,
  198. gint x,
  199. gint y,
  200. gint width,
  201. gint height);
  202. void (*draw_string) (GtkStyle *style,
  203. GdkWindow *window,
  204. GtkStateType state_type,
  205. GdkRectangle *area,
  206. GtkWidget *widget,
  207. const gchar *detail,
  208. gint x,
  209. gint y,
  210. const gchar *string);
  211. void (*draw_box) (GtkStyle *style,
  212. GdkWindow *window,
  213. GtkStateType state_type,
  214. GtkShadowType shadow_type,
  215. GdkRectangle *area,
  216. GtkWidget *widget,
  217. const gchar *detail,
  218. gint x,
  219. gint y,
  220. gint width,
  221. gint height);
  222. void (*draw_flat_box) (GtkStyle *style,
  223. GdkWindow *window,
  224. GtkStateType state_type,
  225. GtkShadowType shadow_type,
  226. GdkRectangle *area,
  227. GtkWidget *widget,
  228. const gchar *detail,
  229. gint x,
  230. gint y,
  231. gint width,
  232. gint height);
  233. void (*draw_check) (GtkStyle *style,
  234. GdkWindow *window,
  235. GtkStateType state_type,
  236. GtkShadowType shadow_type,
  237. GdkRectangle *area,
  238. GtkWidget *widget,
  239. const gchar *detail,
  240. gint x,
  241. gint y,
  242. gint width,
  243. gint height);
  244. void (*draw_option) (GtkStyle *style,
  245. GdkWindow *window,
  246. GtkStateType state_type,
  247. GtkShadowType shadow_type,
  248. GdkRectangle *area,
  249. GtkWidget *widget,
  250. const gchar *detail,
  251. gint x,
  252. gint y,
  253. gint width,
  254. gint height);
  255. void (*draw_tab) (GtkStyle *style,
  256. GdkWindow *window,
  257. GtkStateType state_type,
  258. GtkShadowType shadow_type,
  259. GdkRectangle *area,
  260. GtkWidget *widget,
  261. const gchar *detail,
  262. gint x,
  263. gint y,
  264. gint width,
  265. gint height);
  266. void (*draw_shadow_gap) (GtkStyle *style,
  267. GdkWindow *window,
  268. GtkStateType state_type,
  269. GtkShadowType shadow_type,
  270. GdkRectangle *area,
  271. GtkWidget *widget,
  272. const gchar *detail,
  273. gint x,
  274. gint y,
  275. gint width,
  276. gint height,
  277. GtkPositionType gap_side,
  278. gint gap_x,
  279. gint gap_width);
  280. void (*draw_box_gap) (GtkStyle *style,
  281. GdkWindow *window,
  282. GtkStateType state_type,
  283. GtkShadowType shadow_type,
  284. GdkRectangle *area,
  285. GtkWidget *widget,
  286. const gchar *detail,
  287. gint x,
  288. gint y,
  289. gint width,
  290. gint height,
  291. GtkPositionType gap_side,
  292. gint gap_x,
  293. gint gap_width);
  294. void (*draw_extension) (GtkStyle *style,
  295. GdkWindow *window,
  296. GtkStateType state_type,
  297. GtkShadowType shadow_type,
  298. GdkRectangle *area,
  299. GtkWidget *widget,
  300. const gchar *detail,
  301. gint x,
  302. gint y,
  303. gint width,
  304. gint height,
  305. GtkPositionType gap_side);
  306. void (*draw_focus) (GtkStyle *style,
  307. GdkWindow *window,
  308. GtkStateType state_type,
  309. GdkRectangle *area,
  310. GtkWidget *widget,
  311. const gchar *detail,
  312. gint x,
  313. gint y,
  314. gint width,
  315. gint height);
  316. void (*draw_slider) (GtkStyle *style,
  317. GdkWindow *window,
  318. GtkStateType state_type,
  319. GtkShadowType shadow_type,
  320. GdkRectangle *area,
  321. GtkWidget *widget,
  322. const gchar *detail,
  323. gint x,
  324. gint y,
  325. gint width,
  326. gint height,
  327. GtkOrientation orientation);
  328. void (*draw_handle) (GtkStyle *style,
  329. GdkWindow *window,
  330. GtkStateType state_type,
  331. GtkShadowType shadow_type,
  332. GdkRectangle *area,
  333. GtkWidget *widget,
  334. const gchar *detail,
  335. gint x,
  336. gint y,
  337. gint width,
  338. gint height,
  339. GtkOrientation orientation);
  340. void (*draw_expander) (GtkStyle *style,
  341. GdkWindow *window,
  342. GtkStateType state_type,
  343. GdkRectangle *area,
  344. GtkWidget *widget,
  345. const gchar *detail,
  346. gint x,
  347. gint y,
  348. GtkExpanderStyle expander_style);
  349. void (*draw_layout) (GtkStyle *style,
  350. GdkWindow *window,
  351. GtkStateType state_type,
  352. gboolean use_text,
  353. GdkRectangle *area,
  354. GtkWidget *widget,
  355. const gchar *detail,
  356. gint x,
  357. gint y,
  358. PangoLayout *layout);
  359. void (*draw_resize_grip) (GtkStyle *style,
  360. GdkWindow *window,
  361. GtkStateType state_type,
  362. GdkRectangle *area,
  363. GtkWidget *widget,
  364. const gchar *detail,
  365. GdkWindowEdge edge,
  366. gint x,
  367. gint y,
  368. gint width,
  369. gint height);
  370. void (*draw_spinner) (GtkStyle *style,
  371. GdkWindow *window,
  372. GtkStateType state_type,
  373. GdkRectangle *area,
  374. GtkWidget *widget,
  375. const gchar *detail,
  376. guint step,
  377. gint x,
  378. gint y,
  379. gint width,
  380. gint height);
  381. /* Padding for future expansion */
  382. void (*_gtk_reserved1) (void);
  383. void (*_gtk_reserved2) (void);
  384. void (*_gtk_reserved3) (void);
  385. void (*_gtk_reserved4) (void);
  386. void (*_gtk_reserved5) (void);
  387. void (*_gtk_reserved6) (void);
  388. void (*_gtk_reserved7) (void);
  389. void (*_gtk_reserved8) (void);
  390. void (*_gtk_reserved9) (void);
  391. void (*_gtk_reserved10) (void);
  392. void (*_gtk_reserved11) (void);
  393. };
  394. struct _GtkBorder
  395. {
  396. gint left;
  397. gint right;
  398. gint top;
  399. gint bottom;
  400. };
  401. GType gtk_style_get_type (void) G_GNUC_CONST;
  402. GtkStyle* gtk_style_new (void);
  403. GtkStyle* gtk_style_copy (GtkStyle *style);
  404. GtkStyle* gtk_style_attach (GtkStyle *style,
  405. GdkWindow *window) G_GNUC_WARN_UNUSED_RESULT;
  406. void gtk_style_detach (GtkStyle *style);
  407. #ifndef GTK_DISABLE_DEPRECATED
  408. GtkStyle* gtk_style_ref (GtkStyle *style);
  409. void gtk_style_unref (GtkStyle *style);
  410. GdkFont * gtk_style_get_font (GtkStyle *style);
  411. void gtk_style_set_font (GtkStyle *style,
  412. GdkFont *font);
  413. #endif /* GTK_DISABLE_DEPRECATED */
  414. void gtk_style_set_background (GtkStyle *style,
  415. GdkWindow *window,
  416. GtkStateType state_type);
  417. void gtk_style_apply_default_background (GtkStyle *style,
  418. GdkWindow *window,
  419. gboolean set_bg,
  420. GtkStateType state_type,
  421. const GdkRectangle *area,
  422. gint x,
  423. gint y,
  424. gint width,
  425. gint height);
  426. GtkIconSet* gtk_style_lookup_icon_set (GtkStyle *style,
  427. const gchar *stock_id);
  428. gboolean gtk_style_lookup_color (GtkStyle *style,
  429. const gchar *color_name,
  430. GdkColor *color);
  431. GdkPixbuf* gtk_style_render_icon (GtkStyle *style,
  432. const GtkIconSource *source,
  433. GtkTextDirection direction,
  434. GtkStateType state,
  435. GtkIconSize size,
  436. GtkWidget *widget,
  437. const gchar *detail);
  438. #ifndef GTK_DISABLE_DEPRECATED
  439. void gtk_draw_hline (GtkStyle *style,
  440. GdkWindow *window,
  441. GtkStateType state_type,
  442. gint x1,
  443. gint x2,
  444. gint y);
  445. void gtk_draw_vline (GtkStyle *style,
  446. GdkWindow *window,
  447. GtkStateType state_type,
  448. gint y1_,
  449. gint y2_,
  450. gint x);
  451. void gtk_draw_shadow (GtkStyle *style,
  452. GdkWindow *window,
  453. GtkStateType state_type,
  454. GtkShadowType shadow_type,
  455. gint x,
  456. gint y,
  457. gint width,
  458. gint height);
  459. void gtk_draw_polygon (GtkStyle *style,
  460. GdkWindow *window,
  461. GtkStateType state_type,
  462. GtkShadowType shadow_type,
  463. GdkPoint *points,
  464. gint npoints,
  465. gboolean fill);
  466. void gtk_draw_arrow (GtkStyle *style,
  467. GdkWindow *window,
  468. GtkStateType state_type,
  469. GtkShadowType shadow_type,
  470. GtkArrowType arrow_type,
  471. gboolean fill,
  472. gint x,
  473. gint y,
  474. gint width,
  475. gint height);
  476. void gtk_draw_diamond (GtkStyle *style,
  477. GdkWindow *window,
  478. GtkStateType state_type,
  479. GtkShadowType shadow_type,
  480. gint x,
  481. gint y,
  482. gint width,
  483. gint height);
  484. void gtk_draw_box (GtkStyle *style,
  485. GdkWindow *window,
  486. GtkStateType state_type,
  487. GtkShadowType shadow_type,
  488. gint x,
  489. gint y,
  490. gint width,
  491. gint height);
  492. void gtk_draw_flat_box (GtkStyle *style,
  493. GdkWindow *window,
  494. GtkStateType state_type,
  495. GtkShadowType shadow_type,
  496. gint x,
  497. gint y,
  498. gint width,
  499. gint height);
  500. void gtk_draw_check (GtkStyle *style,
  501. GdkWindow *window,
  502. GtkStateType state_type,
  503. GtkShadowType shadow_type,
  504. gint x,
  505. gint y,
  506. gint width,
  507. gint height);
  508. void gtk_draw_option (GtkStyle *style,
  509. GdkWindow *window,
  510. GtkStateType state_type,
  511. GtkShadowType shadow_type,
  512. gint x,
  513. gint y,
  514. gint width,
  515. gint height);
  516. void gtk_draw_tab (GtkStyle *style,
  517. GdkWindow *window,
  518. GtkStateType state_type,
  519. GtkShadowType shadow_type,
  520. gint x,
  521. gint y,
  522. gint width,
  523. gint height);
  524. void gtk_draw_shadow_gap (GtkStyle *style,
  525. GdkWindow *window,
  526. GtkStateType state_type,
  527. GtkShadowType shadow_type,
  528. gint x,
  529. gint y,
  530. gint width,
  531. gint height,
  532. GtkPositionType gap_side,
  533. gint gap_x,
  534. gint gap_width);
  535. void gtk_draw_box_gap (GtkStyle *style,
  536. GdkWindow *window,
  537. GtkStateType state_type,
  538. GtkShadowType shadow_type,
  539. gint x,
  540. gint y,
  541. gint width,
  542. gint height,
  543. GtkPositionType gap_side,
  544. gint gap_x,
  545. gint gap_width);
  546. void gtk_draw_extension (GtkStyle *style,
  547. GdkWindow *window,
  548. GtkStateType state_type,
  549. GtkShadowType shadow_type,
  550. gint x,
  551. gint y,
  552. gint width,
  553. gint height,
  554. GtkPositionType gap_side);
  555. void gtk_draw_focus (GtkStyle *style,
  556. GdkWindow *window,
  557. gint x,
  558. gint y,
  559. gint width,
  560. gint height);
  561. void gtk_draw_slider (GtkStyle *style,
  562. GdkWindow *window,
  563. GtkStateType state_type,
  564. GtkShadowType shadow_type,
  565. gint x,
  566. gint y,
  567. gint width,
  568. gint height,
  569. GtkOrientation orientation);
  570. void gtk_draw_handle (GtkStyle *style,
  571. GdkWindow *window,
  572. GtkStateType state_type,
  573. GtkShadowType shadow_type,
  574. gint x,
  575. gint y,
  576. gint width,
  577. gint height,
  578. GtkOrientation orientation);
  579. void gtk_draw_expander (GtkStyle *style,
  580. GdkWindow *window,
  581. GtkStateType state_type,
  582. gint x,
  583. gint y,
  584. GtkExpanderStyle expander_style);
  585. void gtk_draw_layout (GtkStyle *style,
  586. GdkWindow *window,
  587. GtkStateType state_type,
  588. gboolean use_text,
  589. gint x,
  590. gint y,
  591. PangoLayout *layout);
  592. void gtk_draw_resize_grip (GtkStyle *style,
  593. GdkWindow *window,
  594. GtkStateType state_type,
  595. GdkWindowEdge edge,
  596. gint x,
  597. gint y,
  598. gint width,
  599. gint height);
  600. #endif /* GTK_DISABLE_DEPRECATED */
  601. void gtk_paint_hline (GtkStyle *style,
  602. GdkWindow *window,
  603. GtkStateType state_type,
  604. const GdkRectangle *area,
  605. GtkWidget *widget,
  606. const gchar *detail,
  607. gint x1,
  608. gint x2,
  609. gint y);
  610. void gtk_paint_vline (GtkStyle *style,
  611. GdkWindow *window,
  612. GtkStateType state_type,
  613. const GdkRectangle *area,
  614. GtkWidget *widget,
  615. const gchar *detail,
  616. gint y1_,
  617. gint y2_,
  618. gint x);
  619. void gtk_paint_shadow (GtkStyle *style,
  620. GdkWindow *window,
  621. GtkStateType state_type,
  622. GtkShadowType shadow_type,
  623. const GdkRectangle *area,
  624. GtkWidget *widget,
  625. const gchar *detail,
  626. gint x,
  627. gint y,
  628. gint width,
  629. gint height);
  630. void gtk_paint_polygon (GtkStyle *style,
  631. GdkWindow *window,
  632. GtkStateType state_type,
  633. GtkShadowType shadow_type,
  634. const GdkRectangle *area,
  635. GtkWidget *widget,
  636. const gchar *detail,
  637. const GdkPoint *points,
  638. gint n_points,
  639. gboolean fill);
  640. void gtk_paint_arrow (GtkStyle *style,
  641. GdkWindow *window,
  642. GtkStateType state_type,
  643. GtkShadowType shadow_type,
  644. const GdkRectangle *area,
  645. GtkWidget *widget,
  646. const gchar *detail,
  647. GtkArrowType arrow_type,
  648. gboolean fill,
  649. gint x,
  650. gint y,
  651. gint width,
  652. gint height);
  653. void gtk_paint_diamond (GtkStyle *style,
  654. GdkWindow *window,
  655. GtkStateType state_type,
  656. GtkShadowType shadow_type,
  657. const GdkRectangle *area,
  658. GtkWidget *widget,
  659. const gchar *detail,
  660. gint x,
  661. gint y,
  662. gint width,
  663. gint height);
  664. void gtk_paint_box (GtkStyle *style,
  665. GdkWindow *window,
  666. GtkStateType state_type,
  667. GtkShadowType shadow_type,
  668. const GdkRectangle *area,
  669. GtkWidget *widget,
  670. const gchar *detail,
  671. gint x,
  672. gint y,
  673. gint width,
  674. gint height);
  675. void gtk_paint_flat_box (GtkStyle *style,
  676. GdkWindow *window,
  677. GtkStateType state_type,
  678. GtkShadowType shadow_type,
  679. const GdkRectangle *area,
  680. GtkWidget *widget,
  681. const gchar *detail,
  682. gint x,
  683. gint y,
  684. gint width,
  685. gint height);
  686. void gtk_paint_check (GtkStyle *style,
  687. GdkWindow *window,
  688. GtkStateType state_type,
  689. GtkShadowType shadow_type,
  690. const GdkRectangle *area,
  691. GtkWidget *widget,
  692. const gchar *detail,
  693. gint x,
  694. gint y,
  695. gint width,
  696. gint height);
  697. void gtk_paint_option (GtkStyle *style,
  698. GdkWindow *window,
  699. GtkStateType state_type,
  700. GtkShadowType shadow_type,
  701. const GdkRectangle *area,
  702. GtkWidget *widget,
  703. const gchar *detail,
  704. gint x,
  705. gint y,
  706. gint width,
  707. gint height);
  708. void gtk_paint_tab (GtkStyle *style,
  709. GdkWindow *window,
  710. GtkStateType state_type,
  711. GtkShadowType shadow_type,
  712. const GdkRectangle *area,
  713. GtkWidget *widget,
  714. const gchar *detail,
  715. gint x,
  716. gint y,
  717. gint width,
  718. gint height);
  719. void gtk_paint_shadow_gap (GtkStyle *style,
  720. GdkWindow *window,
  721. GtkStateType state_type,
  722. GtkShadowType shadow_type,
  723. const GdkRectangle *area,
  724. GtkWidget *widget,
  725. const gchar *detail,
  726. gint x,
  727. gint y,
  728. gint width,
  729. gint height,
  730. GtkPositionType gap_side,
  731. gint gap_x,
  732. gint gap_width);
  733. void gtk_paint_box_gap (GtkStyle *style,
  734. GdkWindow *window,
  735. GtkStateType state_type,
  736. GtkShadowType shadow_type,
  737. const GdkRectangle *area,
  738. GtkWidget *widget,
  739. const gchar *detail,
  740. gint x,
  741. gint y,
  742. gint width,
  743. gint height,
  744. GtkPositionType gap_side,
  745. gint gap_x,
  746. gint gap_width);
  747. void gtk_paint_extension (GtkStyle *style,
  748. GdkWindow *window,
  749. GtkStateType state_type,
  750. GtkShadowType shadow_type,
  751. const GdkRectangle *area,
  752. GtkWidget *widget,
  753. const gchar *detail,
  754. gint x,
  755. gint y,
  756. gint width,
  757. gint height,
  758. GtkPositionType gap_side);
  759. void gtk_paint_focus (GtkStyle *style,
  760. GdkWindow *window,
  761. GtkStateType state_type,
  762. const GdkRectangle *area,
  763. GtkWidget *widget,
  764. const gchar *detail,
  765. gint x,
  766. gint y,
  767. gint width,
  768. gint height);
  769. void gtk_paint_slider (GtkStyle *style,
  770. GdkWindow *window,
  771. GtkStateType state_type,
  772. GtkShadowType shadow_type,
  773. const GdkRectangle *area,
  774. GtkWidget *widget,
  775. const gchar *detail,
  776. gint x,
  777. gint y,
  778. gint width,
  779. gint height,
  780. GtkOrientation orientation);
  781. void gtk_paint_handle (GtkStyle *style,
  782. GdkWindow *window,
  783. GtkStateType state_type,
  784. GtkShadowType shadow_type,
  785. const GdkRectangle *area,
  786. GtkWidget *widget,
  787. const gchar *detail,
  788. gint x,
  789. gint y,
  790. gint width,
  791. gint height,
  792. GtkOrientation orientation);
  793. void gtk_paint_expander (GtkStyle *style,
  794. GdkWindow *window,
  795. GtkStateType state_type,
  796. const GdkRectangle *area,
  797. GtkWidget *widget,
  798. const gchar *detail,
  799. gint x,
  800. gint y,
  801. GtkExpanderStyle expander_style);
  802. void gtk_paint_layout (GtkStyle *style,
  803. GdkWindow *window,
  804. GtkStateType state_type,
  805. gboolean use_text,
  806. const GdkRectangle *area,
  807. GtkWidget *widget,
  808. const gchar *detail,
  809. gint x,
  810. gint y,
  811. PangoLayout *layout);
  812. void gtk_paint_resize_grip (GtkStyle *style,
  813. GdkWindow *window,
  814. GtkStateType state_type,
  815. const GdkRectangle *area,
  816. GtkWidget *widget,
  817. const gchar *detail,
  818. GdkWindowEdge edge,
  819. gint x,
  820. gint y,
  821. gint width,
  822. gint height);
  823. void gtk_paint_spinner (GtkStyle *style,
  824. GdkWindow *window,
  825. GtkStateType state_type,
  826. const GdkRectangle *area,
  827. GtkWidget *widget,
  828. const gchar *detail,
  829. guint step,
  830. gint x,
  831. gint y,
  832. gint width,
  833. gint height);
  834. GType gtk_border_get_type (void) G_GNUC_CONST;
  835. GtkBorder *gtk_border_new (void) G_GNUC_MALLOC;
  836. GtkBorder *gtk_border_copy (const GtkBorder *border_);
  837. void gtk_border_free (GtkBorder *border_);
  838. void gtk_style_get_style_property (GtkStyle *style,
  839. GType widget_type,
  840. const gchar *property_name,
  841. GValue *value);
  842. void gtk_style_get_valist (GtkStyle *style,
  843. GType widget_type,
  844. const gchar *first_property_name,
  845. va_list var_args);
  846. void gtk_style_get (GtkStyle *style,
  847. GType widget_type,
  848. const gchar *first_property_name,
  849. ...) G_GNUC_NULL_TERMINATED;
  850. /* --- private API --- */
  851. const GValue* _gtk_style_peek_property_value (GtkStyle *style,
  852. GType widget_type,
  853. GParamSpec *pspec,
  854. GtkRcPropertyParser parser);
  855. void _gtk_style_init_for_settings (GtkStyle *style,
  856. GtkSettings *settings);
  857. void _gtk_style_shade (const GdkColor *a,
  858. GdkColor *b,
  859. gdouble k);
  860. /* deprecated */
  861. #ifndef GTK_DISABLE_DEPRECATED
  862. #define gtk_style_apply_default_pixmap(s,gw,st,a,x,y,w,h) gtk_style_apply_default_background (s,gw,1,st,a,x,y,w,h)
  863. void gtk_draw_string (GtkStyle *style,
  864. GdkWindow *window,
  865. GtkStateType state_type,
  866. gint x,
  867. gint y,
  868. const gchar *string);
  869. void gtk_paint_string (GtkStyle *style,
  870. GdkWindow *window,
  871. GtkStateType state_type,
  872. const GdkRectangle *area,
  873. GtkWidget *widget,
  874. const gchar *detail,
  875. gint x,
  876. gint y,
  877. const gchar *string);
  878. #endif /* GTK_DISABLE_DEPRECATED */
  879. void gtk_draw_insertion_cursor (GtkWidget *widget,
  880. GdkDrawable *drawable,
  881. const GdkRectangle *area,
  882. const GdkRectangle *location,
  883. gboolean is_primary,
  884. GtkTextDirection direction,
  885. gboolean draw_arrow);
  886. GdkGC *_gtk_widget_get_cursor_gc (GtkWidget *widget);
  887. void _gtk_widget_get_cursor_color (GtkWidget *widget,
  888. GdkColor *color);
  889. G_END_DECLS
  890. #endif /* __GTK_STYLE_H__ */