Class: XSettings::Manager
- Inherits:
-
Object
- Object
- XSettings::Manager
- Defined in:
- ext/xsettings/xsettings.c
Class Method Summary collapse
-
.exists? ⇒ Boolean
Code.
Instance Method Summary collapse
Class Method Details
.exists? ⇒ Boolean
Code
73 74 75 76 77 78 79 80 81 82 |
# File 'ext/xsettings/xsettings.c', line 73
static VALUE
Manager_CLASS_exists_query(VALUE self)
{
VALUE __p_retval = Qnil;
#line 33 "/home/geoff/Projects/xsettings/ext/xsettings/xsettings.cr"
do { __p_retval = ((xsettings_manager_check_running(GDK_DISPLAY(), DefaultScreen(GDK_DISPLAY()))) ? Qtrue : Qfalse); goto out; } while(0);
out:
return __p_retval;
}
|
Instance Method Details
#[]=(__v_name, value) ⇒ Object
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'ext/xsettings/xsettings.c', line 128
static VALUE
Manager__brace_brace_equals(VALUE self, VALUE __v_name, VALUE value)
{
char * name; char * __orig_name;
XSettingsManager *_self = manager_unwrap(self);
__orig_name = name = ( NIL_P(__v_name) ? NULL : StringValuePtr(__v_name) );
#line 53 "/home/geoff/Projects/xsettings/ext/xsettings/xsettings.cr"
do {
switch(TYPE(value)) { case T_NIL: case T_TRUE: case T_FALSE: xsettings_manager_set_int(_self, name, RTEST(value));
break;
case T_FIXNUM: xsettings_manager_set_int(_self, name, NUM2INT(value));
break;
case T_STRING: xsettings_manager_set_string(_self, name, StringValuePtr(value));
break;
case T_ARRAY: if (RARRAY_LEN(value) == 4) { XSettingsColor col ;
col.red = NUM2INT(RARRAY_PTR(value)[0]);
col.green = NUM2INT(RARRAY_PTR(value)[1]);
col.blue = NUM2INT(RARRAY_PTR(value)[2]);
col.alpha = NUM2INT(RARRAY_PTR(value)[3]);
xsettings_manager_set_color(_self, name, &col);
} break;
}
} while(0);
return Qnil;
}
|
#destroy ⇒ Object
106 107 108 109 110 111 112 113 114 115 |
# File 'ext/xsettings/xsettings.c', line 106
static VALUE
Manager_destroy(VALUE self)
{
XSettingsManager *_self = manager_unwrap(self);
#line 47 "/home/geoff/Projects/xsettings/ext/xsettings/xsettings.cr"
xsettings_manager_destroy(_self);
return Qnil;
}
|
#notify ⇒ Object
117 118 119 120 121 122 123 124 125 126 |
# File 'ext/xsettings/xsettings.c', line 117
static VALUE
Manager_notify(VALUE self)
{
XSettingsManager *_self = manager_unwrap(self);
#line 50 "/home/geoff/Projects/xsettings/ext/xsettings/xsettings.cr"
xsettings_manager_notify(_self);
return Qnil;
}
|
#terminated ⇒ Object
95 96 97 98 99 100 101 102 103 104 |
# File 'ext/xsettings/xsettings.c', line 95
static VALUE
Manager_terminated(VALUE self)
{
XSettingsManager *_self = manager_unwrap(self);
#line 44 "/home/geoff/Projects/xsettings/ext/xsettings/xsettings.cr"
_self = _self;
return Qnil;
}
|