~ubuntu-branches/ubuntu/utopic/rggobi/utopic

« back to all changes in this revision

Viewing changes to src/displays.c

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2006-11-09 20:28:24 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20061109202824-rprmht1pviku76qg
Tags: 2.1.4-1-1
* New upstream release
* debian/rules: Simplied to one-liner sourcing r-cran.mk
* debian/control: (Build-)Depends: upgraded to the current versions
  r-base-core (>= 2.4.0) and ggobi (>= 2.1.4)
* debian/control: Added Depends: on r-cran-rgtk2; we cannot currently
  Build-Depends: on it as it wants an X11 display which stop autobuilds
* debian/control: Standards-Version: upgraded to 3.7.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
USER_OBJECT_
5
5
RS_GGOBI(getNumDisplays)(USER_OBJECT_ ggobiId)
6
6
{
7
 
  ggobid *gg = GGOBI_GGOBI(toGGobi(ggobiId));
 
7
  ggobid *gg = toGGobi(ggobiId);
8
8
  int len;
9
9
  USER_OBJECT_ ans = NEW_INTEGER(1);
 
10
  g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT);
10
11
  if(gg) {
11
12
   len = g_list_length(gg->displays);
12
13
   INTEGER_DATA(ans)[0] = len;
18
19
USER_OBJECT_
19
20
RS_GGOBI(getCurrentDisplayType)(USER_OBJECT_ ggobiId)
20
21
{
21
 
  ggobid *gg = GGOBI_GGOBI(toGGobi(ggobiId));
 
22
  ggobid *gg = toGGobi(ggobiId);
22
23
  USER_OBJECT_ ans;
23
24
  const gchar *name = GGOBI(getCurrentDisplayType)(gg);
 
25
  g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT);
24
26
 
25
27
  PROTECT(ans = NEW_CHARACTER(1));
26
28
  SET_STRING_ELT(ans, 0, COPY_TO_USER_STRING(name));
50
52
  for( ; l ; l = l->next, n++) {
51
53
     GGobiExtendedDisplayClass *klass;
52
54
     klass = GGOBI_EXTENDED_DISPLAY_CLASS((GtkObjectClass*) l->data);
53
 
     //SET_STRING_ELT(ans, n, COPY_TO_USER_STRING(klass->titleLabel));
54
55
         SET_STRING_ELT(names, n, COPY_TO_USER_STRING(klass->titleLabel));
55
56
     SET_VECTOR_ELT(ans, n, asRString(g_type_name(G_OBJECT_CLASS_TYPE(klass))));
56
57
  }
75
76
    for(i = 0; i < numDisplays; i++) {
76
77
      displayd *display;
77
78
      windowDisplayd *wdpy;
78
 
      display = GetDisplay(VECTOR_ELT(displays, i), ggobiId, NULL);
79
 
      if(display == NULL || GGOBI_IS_WINDOW_DISPLAY(display) == false)
80
 
          continue;
 
79
      display = toDisplay(VECTOR_ELT(displays, i));
 
80
      g_return_val_if_fail(GGOBI_IS_DISPLAY(display), NULL_USER_OBJECT);
81
81
 
82
82
      wdpy = GGOBI_WINDOW_DISPLAY(display);
83
83
 
120
120
  PROTECT(ans = NEW_LIST(n));
121
121
  i = 0;
122
122
  for (dlist = gg->displays; dlist ; dlist = dlist->next, i++) {
123
 
    SET_VECTOR_ELT(ans, i, RS_displayInstance((displayd*)dlist->data, gg, -1));
 
123
    SET_VECTOR_ELT(ans, i, RS_displayInstance((displayd*)dlist->data));
124
124
  }
125
125
  UNPROTECT(1);
126
126
 
134
134
USER_OBJECT_
135
135
RS_GGOBI(getDisplays)(USER_OBJECT_ ggobiId)
136
136
{
137
 
  ggobid *gg = GGOBI_GGOBI(toGGobi(ggobiId));
 
137
  ggobid *gg = toGGobi(ggobiId);
 
138
  g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT);
138
139
  return(RS_INTERNAL_GGOBI(getDisplays)(gg));
139
140
}
140
141
 
141
142
USER_OBJECT_
142
143
RS_GGOBI(getCurrentDisplay)(USER_OBJECT_ gobiId)
143
144
{
144
 
  ggobid *gg = GGOBI_GGOBI(toGGobi(gobiId));
 
145
  ggobid *gg = toGGobi(gobiId);
145
146
  USER_OBJECT_ ans;
 
147
  g_return_val_if_fail(GGOBI_IS_GGOBI(gg), NULL_USER_OBJECT);
146
148
 
147
149
  ans = toRPointer(gg->current_display, "GtkWidget");
148
150