]> git.sesse.net Git - vlc/blobdiff - include/vlc_variables.h
Add extensions to open dialog ones
[vlc] / include / vlc_variables.h
index 51d371b6ffa468c15f3fdd92a044cb3780862e3b..0a9d7057b20d214f23621cfc3c96b9c752c37c3d 100644 (file)
@@ -223,6 +223,16 @@ static inline int var_SetTime( vlc_object_t *p_obj, const char *psz_name, int64_
     return var_SetChecked( p_obj, psz_name, VLC_VAR_TIME, val );
 }
 
+static inline int var_SetCoords( vlc_object_t *obj, const char *name,
+                                 int32_t x, int32_t y )
+{
+    vlc_value_t val;
+    val.coords.x = x;
+    val.coords.y = y;
+    return var_SetChecked (obj, name, VLC_VAR_COORDS, val);
+}
+#define var_SetCoords(o,n,x,y) var_SetCoords(VLC_OBJECT(o),n,x,y)
+
 /**
  * Set the value of a float variable
  *
@@ -323,6 +333,21 @@ static inline int64_t var_GetTime( vlc_object_t *p_obj, const char *psz_name )
         return 0;
 }
 
+static inline void var_GetCoords( vlc_object_t *obj, const char *name,
+                                  int32_t *px, int32_t *py )
+{
+    vlc_value_t val;
+
+    if (likely(!var_GetChecked (obj, name, VLC_VAR_COORDS, &val)))
+    {
+        *px = val.coords.x;
+        *py = val.coords.y;
+    }
+    else
+        *px = *py = 0;
+}
+#define var_GetCoords(o,n,x,y) var_GetCoords(VLC_OBJECT(o),n,x,y)
+
 /**
  * Get a float value
  *
@@ -687,6 +712,9 @@ static inline mtime_t var_InheritTime( vlc_object_t *obj, const char *name )
 }
 #define var_InheritTime(o, n) var_InheritTime(VLC_OBJECT(o), n)
 
+VLC_EXPORT( int, var_InheritURational, ( vlc_object_t *, unsigned *num, unsigned *den, const char *var ) );
+#define var_InheritURational(a,b,c,d) var_InheritURational(VLC_OBJECT(a), b, c, d)
+
 #define var_GetInteger(a,b)   var_GetInteger( VLC_OBJECT(a),b)
 #define var_GetBool(a,b)   var_GetBool( VLC_OBJECT(a),b)
 #define var_GetTime(a,b)   var_GetTime( VLC_OBJECT(a),b)