本文整理汇总了C#中GLib.Value类的典型用法代码示例。如果您正苦于以下问题:C# GLib.Value类的具体用法?C# GLib.Value怎么用?C# GLib.Value使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GLib.Value类属于命名空间,在下文中一共展示了GLib.Value类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildOrder
/* View Methods */
public void BuildOrder(StockItem s)
{
String selected = s.StockCode;
//Clear & populate list
combobox2.Clear ();
CellRendererText cell = new CellRendererText ();
combobox2.PackStart (cell, false);
combobox2.AddAttribute (cell, "text", 0);
ListStore store = new ListStore (typeof(string));
combobox2.Model = store;
foreach (KeyValuePair<String, StockItem> kv in stock_list) {
store.AppendValues (kv.Value.StockCode);
}
//Make selected item active
combobox2.Model = store;
TreeIter iter;
combobox2.Model.GetIterFirst (out iter);
do {
GLib.Value thisRow = new GLib.Value ();
combobox2.Model.GetValue (iter, 0, ref thisRow);
if ((thisRow.Val as string).Equals (selected)) {
combobox2.SetActiveIter (iter);
break;
}
} while (combobox2.Model.IterNext (ref iter));
//Refresh order information
OrderData ();
}
示例2: GetCurrentValue
public void GetCurrentValue (ref GLib.Value value)
{
if (rangeValueProvider != null) {
value = new GLib.Value (rangeValueProvider.Value);
return;
}
}
示例3: AddStringValue
public void AddStringValue (TagMergeMode mode, string tag, string value)
{
GLib.Value val = new GLib.Value (GLib.GType.String);
val.Val = value;
IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag);
gst_tag_list_add_value (raw, mode, native_tag, ref val);
GLib.Marshaller.Free (native_tag);
}
示例4: GetProperty
//[DllImport ("libgobject-2.0.so.0")]
//private static extern void g_object_get_property (IntPtr gobject, IntPtr property_name, ref GLib.Value value);
public GLib.Value GetProperty(string name)
{
GLib.Value val = new GLib.Value ();
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
g_object_set_property (raw, native_name, ref val);
GLib.Marshaller.Free (native_name);
return val;
}
示例5: ChildGetProperty
public GLib.Value ChildGetProperty (Gtk.Widget child, string property_name) {
GLib.Value value = new GLib.Value ();
IntPtr native = GLib.Marshaller.StringToPtrGStrdup (property_name);
gtksharp_container_child_get_property (Handle, child.Handle, native, ref value);
GLib.Marshaller.Free (native);
return value;
}
示例6: GetStringProperty
public string GetStringProperty (string name)
{
GLib.Value val = new GLib.Value ();
val.Init (GLib.GType.String);
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
g_object_get_property (raw, native_name, ref val);
GLib.Marshaller.Free (native_name);
return val.Val as string;
}
示例7: GetProperty
public IntPtr GetProperty (string name)
{
GLib.Value val = new GLib.Value ();
val.Init (GLib.GType.Object);
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
g_object_get_property (raw, native_name, ref val);
GLib.Marshaller.Free (native_name);
return ((GLib.Object)(val.Val)).Handle;
}
示例8: GetValue
public override void GetValue (Gtk.TreeIter iter, int column, ref GLib.Value val)
{
Node node = (Node) iter;
if (column == 0)
val = new GLib.Value (node.Name);
else if (column == 1) {
double percent = (double) node.Value / (double) total_hits * 100.0;
val = new GLib.Value (String.Format ("{0,5:F2}%", percent));
}
}
示例9: Gtk3FontChooserDialog
public Gtk3FontChooserDialog (string title, Gtk.Window parent = null) : base (IntPtr.Zero)
{
IntPtr ptitle = GLib.Marshaller.StringToPtrGStrdup (title);
Raw = gtk_font_chooser_dialog_new(ptitle, parent == null ? IntPtr.Zero : parent.Handle);
GLib.Marshaller.Free (ptitle);
using (GLib.Value val = new GLib.Value (true)) {
SetProperty ("show-preview-entry", val);
}
}
示例10: InternalChanged
private void InternalChanged ()
{
GLib.Value ret = GLib.Value.Empty;
GLib.ValueArray inst_and_params = new GLib.ValueArray (1);
GLib.Value[] vals = new GLib.Value [1];
vals [0] = new GLib.Value (this);
inst_and_params.Append (vals [0]);
g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
foreach (GLib.Value v in vals)
v.Dispose ();
}
示例11: OnChangedChannels
protected virtual void OnChangedChannels ()
{
GLib.Value ret = GLib.Value.Empty;
GLib.ValueArray inst_and_params = new GLib.ValueArray (1);
GLib.Value[] vals = new GLib.Value [1];
vals [0] = new GLib.Value (this);
inst_and_params.Append (vals [0]);
g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
foreach (GLib.Value v in vals)
v.Dispose ();
}
示例12: BaconResize
public BaconResize (Gtk.Window window) : base (IntPtr.Zero)
{
this.window = window;
GLib.Value window_val = new GLib.Value (window);
CreateNativeObject (
new string [] { "video-widget" },
new GLib.Value [] { window_val }
);
window_val.Dispose ();
}
示例13: OnSubworldRemoved
protected virtual void OnSubworldRemoved (RC.World subworld)
{
GLib.Value ret = GLib.Value.Empty;
GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
GLib.Value[] vals = new GLib.Value [2];
vals [0] = new GLib.Value (this);
inst_and_params.Append (vals [0]);
vals [1] = new GLib.Value (subworld);
inst_and_params.Append (vals [1]);
g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
foreach (GLib.Value v in vals)
v.Dispose ();
}
示例14: OnPluginLoaded
protected virtual void OnPluginLoaded (Ethos.PluginInfo plugin_info)
{
GLib.Value ret = GLib.Value.Empty;
GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
GLib.Value[] vals = new GLib.Value [2];
vals [0] = new GLib.Value (this);
inst_and_params.Append (vals [0]);
vals [1] = new GLib.Value (plugin_info);
inst_and_params.Append (vals [1]);
g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
foreach (GLib.Value v in vals)
v.Dispose ();
}
示例15: OnPackage
protected virtual void OnPackage (PackageKit.PackageObj obj)
{
GLib.Value ret = GLib.Value.Empty;
GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
GLib.Value[] vals = new GLib.Value [2];
vals [0] = new GLib.Value (this);
inst_and_params.Append (vals [0]);
vals [1] = new GLib.Value (obj);
inst_and_params.Append (vals [1]);
g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
foreach (GLib.Value v in vals)
v.Dispose ();
}