<commit_before>/*
 * $Header$
 */

#include "gtk2perl.h"

MODULE = Gtk2::Style	PACKAGE = Gtk2::Style	PREFIX = gtk_style_

SV *
stateless_member (style)
	GtkStyle * style
    ALIAS:
	Gtk2::Style::black = 1
	Gtk2::Style::white = 2
	Gtk2::Style::font_desc = 3
	Gtk2::Style::xthickness = 4
	Gtk2::Style::ythickness = 5
	Gtk2::Style::black_gc = 6
	Gtk2::Style::white_gc = 7
    CODE:
	switch (ix) {
	    /* FIXME: is it correct to _copy these */
	    case 1: RETVAL = newSVGdkColor_copy (&(style->black)); break;
	    case 2: RETVAL = newSVGdkColor_copy (&(style->white)); break;
	    case 3: RETVAL = newSVPangoFontDescription_copy (&(style->font_desc)); break;
	    case 4: RETVAL = newSViv (style->xthickness); break;
	    case 5: RETVAL = newSViv (style->ythickness); break;
	    case 6: RETVAL = newSVGdkGC (style->black_gc); break;
	    case 7: RETVAL = newSVGdkGC (style->white_gc); break;
	    default: croak ("augh! unhandled stateless style member");
	}
    OUTPUT:
	RETVAL

## FIXME: is it correct to _copy these
GdkColor_copy *
state_color (style, state)
	GtkStyle * style<commit_msg>set 'no warn for unregistered subclasses' on GtkStyle; causes the type system to stop spewing messages on stderr about unregistered types from theme engines.<commit_after>/*
 * $Header$
 */

#include "gtk2perl.h"

MODULE = Gtk2::Style	PACKAGE = Gtk2::Style	PREFIX = gtk_style_

BOOT:
	/* theme engines can provide subclasses on GtkStyle which may have
	 * any name they like, and will not be registered with the gperl
	 * bindings type subsystem.  any time a user has the theme set to
	 * anything other than the default, one of these unregistered
	 * styles comes through.  set this to keep gperl_get_object from
	 * spewing harmless and unavoidable warnings all over stderr. */
	gperl_object_set_no_warn_unreg_subclass (GTK_TYPE_STYLE, TRUE);

SV *
stateless_member (style)
	GtkStyle * style
    ALIAS:
	Gtk2::Style::black = 1
	Gtk2::Style::white = 2
	Gtk2::Style::font_desc = 3
	Gtk2::Style::xthickness = 4
	Gtk2::Style::ythickness = 5
	Gtk2::Style::black_gc = 6
	Gtk2::Style::white_gc = 7
    CODE:
	switch (ix) {
	    /* FIXME: is it correct to _copy these */
	    case 1: RETVAL = newSVGdkColor_copy (&(style->black)); break;
	    case 2: RETVAL = newSVGdkColor_copy (&(style->white)); break;
	    case 3: RETVAL = newSVPangoFontDescription_copy (&(style->font_desc)); break;
	    case 4: RETVAL = newSViv (style->xthickness); break;
	    case 5: RETVAL = newSViv (style->ythickness); break;
	    case 6: RETVAL = newSVGdkGC (style->black_gc); break;
	    case 7: RETVAL = newSVGdkGC (style->white_gc); break;
	    default: croak ("augh! unhandled stateless style member");
	}
    OUTPUT:
	RETVAL

## FIXME: is it correct to _copy these
GdkColor_copy *
state_color (style, state)
	GtkStyle * style
{'fraction_non_alphanumeric': 0.11703650680028632, 'fraction_numerical': 0.01717967072297781, 'mean_word_length': 4.063405797101449, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5646883', 'n_tokens_mistral': 1057, 'n_tokens_neox': 980, 'n_words': 294}