I noticed that data types like GWindow, GOval, etc. are actually classes and we are declaring objects using those eg. GWindow window; and GOval circle;. Here window and circle are objects right? How come we can use objects in a structured programming language like C?


the SPL is originally written in Java. as you probably know, Java is an object-oriented programming language.

basically a C program that makes use of the SPL creates a process in the background running the program called spl.jar (located under /usr/lib/ in appliance 2014) through an intermediate layer.

spl.jar a Java program that the SPL provides which takes commands and behaves accordingly (e.g., creates a window, creates an oval, etc).

as we call functions in our program, we end up giving commands to the running Java program through the intermediate layer which, in our case, is written in C.

for example, when we call a function like newGWindow, our program commands the running Java program to create a new window with the given arguments (e.g., width, height, etc).

read professor Eric Robert's paper on the SPL for more details!


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .