mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-01-11 12:05:31 +00:00
2003-02-08 Radek Doulik <rodo@ximian.com>
* glib/MainContext.cs: beginning of MainContext class, just Iteration and Pending methods to be able to refresh Gtk in the middle of time consuming function where it's not worth while to use threads * glue/style.c (gtksharp_gtk_style_get_font_description): new function to access style's font_description field * gtk/Style.custom: added font description property svn path=/trunk/gtk-sharp/; revision=11358
This commit is contained in:
parent
2270b314f8
commit
395c0cdf6f
10
ChangeLog
10
ChangeLog
|
@ -1,5 +1,15 @@
|
||||||
2003-02-08 Radek Doulik <rodo@ximian.com>
|
2003-02-08 Radek Doulik <rodo@ximian.com>
|
||||||
|
|
||||||
|
* glib/MainContext.cs: beginning of MainContext class, just
|
||||||
|
Iteration and Pending methods to be able to refresh Gtk in the
|
||||||
|
middle of time consuming function where it's not worth while to
|
||||||
|
use threads
|
||||||
|
|
||||||
|
* glue/style.c (gtksharp_gtk_style_get_font_description): new
|
||||||
|
function to access style's font_description field
|
||||||
|
|
||||||
|
* gtk/Style.custom: added font description property
|
||||||
|
|
||||||
* gconf/GConf/Client.cs: added SyggestSync method
|
* gconf/GConf/Client.cs: added SyggestSync method
|
||||||
|
|
||||||
2003-02-07 Peter Williams <peterw@ximian.com>
|
2003-02-07 Peter Williams <peterw@ximian.com>
|
||||||
|
|
35
glib/MainContext.cs
Normal file
35
glib/MainContext.cs
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
// GLib.MainContext.cs - mainContext class implementation
|
||||||
|
//
|
||||||
|
// Author: Radek Doulik <rodo@matfyz.cz>
|
||||||
|
//
|
||||||
|
// (C) 2003 Radek Doulik
|
||||||
|
|
||||||
|
namespace GLib {
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
public class MainContext {
|
||||||
|
|
||||||
|
[DllImport("glib-2.0")]
|
||||||
|
static extern bool g_main_context_iteration (IntPtr Raw, bool MayBlock);
|
||||||
|
|
||||||
|
public static bool Iteration ()
|
||||||
|
{
|
||||||
|
return g_main_context_iteration (IntPtr.Zero, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool Iteration (bool MayBlock)
|
||||||
|
{
|
||||||
|
return g_main_context_iteration (IntPtr.Zero, MayBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport("glib-2.0")]
|
||||||
|
static extern bool g_main_context_pending (IntPtr Raw);
|
||||||
|
|
||||||
|
public static bool Pending ()
|
||||||
|
{
|
||||||
|
return g_main_context_pending (IntPtr.Zero);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10
glue/style.c
10
glue/style.c
|
@ -1,8 +1,9 @@
|
||||||
/* style.c : Glue to access fields in GtkStyle.
|
/* style.c : Glue to access fields in GtkStyle.
|
||||||
*
|
*
|
||||||
* Author: Rachel Hestilow <hestilow@ximian.com>
|
* Author: Rachel Hestilow <hestilow@ximian.com>
|
||||||
|
* Radek Doulik <rodo@matfyz.cz>
|
||||||
*
|
*
|
||||||
* <c> 2002 Rachel Hestilow, Mike Kestner
|
* <c> 2002, 2003 Rachel Hestilow, Mike Kestner, Radek Doulik
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gtk/gtkstyle.h>
|
#include <gtk/gtkstyle.h>
|
||||||
|
@ -61,6 +62,12 @@ gtksharp_gtk_style_get_bg (GtkStyle *style, int i)
|
||||||
return &style->bg[i];
|
return &style->bg[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PangoFontDescription *
|
||||||
|
gtksharp_gtk_style_get_font_description (GtkStyle *style)
|
||||||
|
{
|
||||||
|
return style->font_desc;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
gtksharp_gtk_style_get_thickness (GtkStyle *style, int x)
|
gtksharp_gtk_style_get_thickness (GtkStyle *style, int x)
|
||||||
{
|
{
|
||||||
|
@ -78,4 +85,3 @@ gtksharp_gtk_style_set_thickness (GtkStyle *style, int thickness)
|
||||||
else
|
else
|
||||||
style->ythickness = -thickness;
|
style->ythickness = -thickness;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
//
|
//
|
||||||
// Gtk.Style.custom - Gtk Style class customizations
|
// Gtk.Style.custom - Gtk Style class customizations
|
||||||
//
|
//
|
||||||
// Author: Rachel Hestilow <hestilow@ximian.com>
|
// Authors: Rachel Hestilow <hestilow@ximian.com>
|
||||||
|
// Radek Doulik <rodo@matfyz.cz>
|
||||||
//
|
//
|
||||||
// Copyright (C) 2002 Rachel Hestilow
|
// Copyright (C) 2002, 2003 Rachel Hestilow, Radek Doulik
|
||||||
//
|
//
|
||||||
// This code is inserted after the automatically generated code.
|
// This code is inserted after the automatically generated code.
|
||||||
//
|
//
|
||||||
|
@ -149,3 +150,19 @@ public int YThickness {
|
||||||
gtksharp_gtk_style_set_thickness (Handle, -value);
|
gtksharp_gtk_style_set_thickness (Handle, -value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport ("gtksharpglue")]
|
||||||
|
static extern IntPtr gtksharp_gtk_style_get_font_description (IntPtr style);
|
||||||
|
|
||||||
|
public Pango.FontDescription FontDescription {
|
||||||
|
get {
|
||||||
|
IntPtr Raw = gtksharp_gtk_style_get_font_description (Handle);
|
||||||
|
|
||||||
|
if (Raw == IntPtr.Zero)
|
||||||
|
return null;
|
||||||
|
Pango.FontDescription ret = (Pango.FontDescription) GLib.Opaque.GetOpaque (Raw);
|
||||||
|
if (ret == null)
|
||||||
|
ret = new Pango.FontDescription (Raw);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue